@nutui/nutui-react 3.0.18 → 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 (189) hide show
  1. package/CHANGELOG.md +9 -10
  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/types.js +0 -2
  49. package/dist/cjs/packages/nutui.react.build.js +105 -105
  50. package/dist/cjs/packages/nutui.react.js +105 -105
  51. package/dist/cjs/packages/overlay/overlay.js +3 -3
  52. package/dist/cjs/packages/pickerview/pickerview.js +1 -2
  53. package/dist/cjs/packages/pickerview/utils.js +3 -3
  54. package/dist/cjs/packages/popup/popup.d.ts +1 -1
  55. package/dist/cjs/packages/popup/popup.js +59 -4
  56. package/dist/cjs/packages/popup/style/popup.scss +0 -5
  57. package/dist/cjs/packages/popup/style/style.css +0 -3
  58. package/dist/cjs/packages/popup/style-jmapp/popup.scss +0 -5
  59. package/dist/cjs/packages/popup/style-jmapp/style.css +0 -3
  60. package/dist/cjs/packages/popup/style-jrkf/popup.scss +0 -5
  61. package/dist/cjs/packages/popup/style-jrkf/style.css +0 -3
  62. package/dist/cjs/packages/price/style/price.scss +3 -3
  63. package/dist/cjs/packages/price/style/style.css +3 -3
  64. package/dist/cjs/packages/price/style-jmapp/price.scss +3 -3
  65. package/dist/cjs/packages/price/style-jmapp/style.css +3 -3
  66. package/dist/cjs/packages/price/style-jrkf/price.scss +3 -3
  67. package/dist/cjs/packages/price/style-jrkf/style.css +3 -3
  68. package/dist/cjs/packages/pulltorefresh/pulltorefresh.js +41 -51
  69. package/dist/cjs/packages/radio/index.js +0 -2
  70. package/dist/cjs/packages/range/utils.js +3 -3
  71. package/dist/cjs/packages/rate/style/rate.scss +1 -1
  72. package/dist/cjs/packages/rate/style/style.css +1 -1
  73. package/dist/cjs/packages/rate/style-jmapp/rate.scss +1 -1
  74. package/dist/cjs/packages/rate/style-jmapp/style.css +1 -1
  75. package/dist/cjs/packages/rate/style-jrkf/rate.scss +1 -1
  76. package/dist/cjs/packages/rate/style-jrkf/style.css +1 -1
  77. package/dist/cjs/packages/searchbar/searchbar.js +3 -3
  78. package/dist/cjs/packages/shortpassword/shortpassword.js +3 -3
  79. package/dist/cjs/packages/skeleton/skeleton.js +2 -4
  80. package/dist/cjs/packages/swiper/effects/focus.js +4 -4
  81. package/dist/cjs/packages/swiper/index.js +0 -1
  82. package/dist/cjs/packages/switch/switch.js +4 -7
  83. package/dist/cjs/packages/uploader/uploader.js +31 -39
  84. package/dist/cjs/packages/virtuallist/utils.js +6 -6
  85. package/dist/cjs/packages/watermark/watermark.js +4 -8
  86. package/dist/cjs/types/spec/address/base.js +0 -2
  87. package/dist/cjs/types/spec/avatar/taro.d.ts +7 -1
  88. package/dist/cjs/types/spec/popup/base.d.ts +5 -0
  89. package/dist/cjs/types/spec/searchbar/h5.d.ts +2 -1
  90. package/dist/cjs/types/spec/searchbar/taro.d.ts +1 -0
  91. package/dist/cjs/utils/date.js +5 -5
  92. package/dist/cjs/utils/event-mocker.js +10 -18
  93. package/dist/cjs/utils/get-rect.js +4 -4
  94. package/dist/cjs/utils/get-scroll-parent.js +3 -3
  95. package/dist/cjs/utils/merge-props.js +3 -3
  96. package/dist/cjs/utils/merge.js +6 -6
  97. package/dist/cjs/utils/raf.js +3 -3
  98. package/dist/cjs/utils/render.js +5 -9
  99. package/dist/cjs/utils/rubberband.js +3 -3
  100. package/dist/cjs/utils/taro/get-rect.js +14 -24
  101. package/dist/cjs/utils/taro/get-system-info.js +4 -4
  102. package/dist/cjs/utils/taro/platform.js +5 -5
  103. package/dist/es/hooks/use-touch.js +1 -1
  104. package/dist/es/locales/ja-JP.d.ts +3 -0
  105. package/dist/es/locales/ja-JP.js +158 -0
  106. package/dist/es/packages/avatarcropper/avatarcropper.js +4 -7
  107. package/dist/es/packages/badge/style/badge.scss +1 -1
  108. package/dist/es/packages/badge/style/style.css +1 -1
  109. package/dist/es/packages/badge/style-jmapp/badge.scss +1 -1
  110. package/dist/es/packages/badge/style-jmapp/style.css +1 -1
  111. package/dist/es/packages/badge/style-jrkf/badge.scss +1 -1
  112. package/dist/es/packages/badge/style-jrkf/style.css +1 -1
  113. package/dist/es/packages/cascader/cascader.js +12 -21
  114. package/dist/es/packages/col/col.js +17 -12
  115. package/dist/es/packages/collapseitem/collapseitem.js +4 -7
  116. package/dist/es/packages/configprovider/types.d.ts +1 -1
  117. package/dist/es/packages/countdown/countdown.js +1 -2
  118. package/dist/es/packages/countdown/style/countdown.scss +1 -1
  119. package/dist/es/packages/countdown/style/style.css +1 -1
  120. package/dist/es/packages/countdown/style-jmapp/countdown.scss +1 -1
  121. package/dist/es/packages/countdown/style-jmapp/style.css +1 -1
  122. package/dist/es/packages/countdown/style-jrkf/countdown.scss +1 -1
  123. package/dist/es/packages/countdown/style-jrkf/style.css +1 -1
  124. package/dist/es/packages/datepicker/datepicker.js +1 -1
  125. package/dist/es/packages/dialog/dialog.js +4 -7
  126. package/dist/es/packages/dialog/style/dialog.scss +9 -1
  127. package/dist/es/packages/dialog/style/style.css +8 -1
  128. package/dist/es/packages/dialog/style-jmapp/dialog.scss +9 -1
  129. package/dist/es/packages/dialog/style-jmapp/style.css +8 -1
  130. package/dist/es/packages/dialog/style-jrkf/dialog.scss +9 -1
  131. package/dist/es/packages/dialog/style-jrkf/style.css +8 -1
  132. package/dist/es/packages/form/index.js +0 -1
  133. package/dist/es/packages/form/useform.js +46 -53
  134. package/dist/es/packages/infiniteloading/infiniteloading.js +8 -14
  135. package/dist/es/packages/inputnumber/inputnumber.js +16 -28
  136. package/dist/es/packages/lottie/types.js +1 -1
  137. package/dist/es/packages/pickerview/pickerview.js +1 -2
  138. package/dist/es/packages/popup/popup.d.ts +1 -1
  139. package/dist/es/packages/popup/popup.js +60 -5
  140. package/dist/es/packages/popup/style/popup.scss +0 -5
  141. package/dist/es/packages/popup/style/style.css +0 -3
  142. package/dist/es/packages/popup/style-jmapp/popup.scss +0 -5
  143. package/dist/es/packages/popup/style-jmapp/style.css +0 -3
  144. package/dist/es/packages/popup/style-jrkf/popup.scss +0 -5
  145. package/dist/es/packages/popup/style-jrkf/style.css +0 -3
  146. package/dist/es/packages/price/style/price.scss +3 -3
  147. package/dist/es/packages/price/style/style.css +3 -3
  148. package/dist/es/packages/price/style-jmapp/price.scss +3 -3
  149. package/dist/es/packages/price/style-jmapp/style.css +3 -3
  150. package/dist/es/packages/price/style-jrkf/price.scss +3 -3
  151. package/dist/es/packages/price/style-jrkf/style.css +3 -3
  152. package/dist/es/packages/pulltorefresh/pulltorefresh.js +41 -51
  153. package/dist/es/packages/radio/index.js +0 -1
  154. package/dist/es/packages/rate/style/rate.scss +1 -1
  155. package/dist/es/packages/rate/style/style.css +1 -1
  156. package/dist/es/packages/rate/style-jmapp/rate.scss +1 -1
  157. package/dist/es/packages/rate/style-jmapp/style.css +1 -1
  158. package/dist/es/packages/rate/style-jrkf/rate.scss +1 -1
  159. package/dist/es/packages/rate/style-jrkf/style.css +1 -1
  160. package/dist/es/packages/searchbar/searchbar.js +3 -3
  161. package/dist/es/packages/skeleton/skeleton.js +2 -4
  162. package/dist/es/packages/swiper/index.js +0 -1
  163. package/dist/es/packages/switch/switch.js +4 -7
  164. package/dist/es/packages/uploader/uploader.js +31 -39
  165. package/dist/es/packages/watermark/watermark.js +4 -8
  166. package/dist/es/types/spec/address/base.js +1 -1
  167. package/dist/es/types/spec/avatar/taro.d.ts +7 -1
  168. package/dist/es/types/spec/popup/base.d.ts +20 -0
  169. package/dist/es/types/spec/searchbar/h5.d.ts +2 -1
  170. package/dist/es/types/spec/searchbar/taro.d.ts +1 -0
  171. package/dist/es/utils/event-mocker.js +4 -12
  172. package/dist/es/utils/render.js +2 -6
  173. package/dist/es/utils/taro/get-rect.js +10 -20
  174. package/dist/nutui.react.umd.js +470 -610
  175. package/dist/style-jmapp.css +1 -1
  176. package/dist/style-jmapp.scss +39 -39
  177. package/dist/style-jrkf.css +1 -1
  178. package/dist/style-jrkf.scss +38 -38
  179. package/dist/style.css +1 -1
  180. package/dist/style.scss +43 -43
  181. package/dist/styles/jd-font.scss +4 -4
  182. package/dist/styles/theme-dark.scss +90 -56
  183. package/dist/styles/theme-default.scss +94 -60
  184. package/dist/styles/themes/dark.css +1 -1
  185. package/dist/styles/themes/default.css +1 -1
  186. package/dist/styles/variables-jmapp.scss +4 -0
  187. package/dist/styles/variables-jrkf.scss +4 -0
  188. package/dist/styles/variables.scss +4 -0
  189. package/package.json +1 -1
@@ -5,320 +5,320 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- ActionSheet: function() {
12
+ get ActionSheet () {
13
13
  return _actionsheet.default;
14
14
  },
15
- Address: function() {
15
+ get Address () {
16
16
  return _address.default;
17
17
  },
18
- Animate: function() {
18
+ get Animate () {
19
19
  return _animate.default;
20
20
  },
21
- AnimatingNumbers: function() {
21
+ get AnimatingNumbers () {
22
22
  return _animatingnumbers.default;
23
23
  },
24
- Audio: function() {
24
+ get Audio () {
25
25
  return _audio.default;
26
26
  },
27
- Avatar: function() {
27
+ get Avatar () {
28
28
  return _avatar.default;
29
29
  },
30
- AvatarCropper: function() {
30
+ get AvatarCropper () {
31
31
  return _avatarcropper.default;
32
32
  },
33
- AvatarGroup: function() {
33
+ get AvatarGroup () {
34
34
  return _avatargroup.default;
35
35
  },
36
- BackTop: function() {
36
+ get BackTop () {
37
37
  return _backtop.default;
38
38
  },
39
- Badge: function() {
39
+ get Badge () {
40
40
  return _badge.default;
41
41
  },
42
- Barrage: function() {
42
+ get Barrage () {
43
43
  return _barrage.default;
44
44
  },
45
- Button: function() {
45
+ get Button () {
46
46
  return _button.default;
47
47
  },
48
- Calendar: function() {
48
+ get Calendar () {
49
49
  return _calendar.default;
50
50
  },
51
- CalendarCard: function() {
51
+ get CalendarCard () {
52
52
  return _calendarcard.default;
53
53
  },
54
- CalendarItem: function() {
54
+ get CalendarItem () {
55
55
  return _calendaritem.default;
56
56
  },
57
- Card: function() {
57
+ get Card () {
58
58
  return _card.default;
59
59
  },
60
- Cascader: function() {
60
+ get Cascader () {
61
61
  return _cascader.default;
62
62
  },
63
- Cell: function() {
63
+ get Cell () {
64
64
  return _cell.default;
65
65
  },
66
- CellGroup: function() {
66
+ get CellGroup () {
67
67
  return _cellgroup.default;
68
68
  },
69
- Checkbox: function() {
69
+ get Checkbox () {
70
70
  return _checkbox.default;
71
71
  },
72
- CheckboxGroup: function() {
72
+ get CheckboxGroup () {
73
73
  return _checkboxgroup.default;
74
74
  },
75
- CircleProgress: function() {
75
+ get CircleProgress () {
76
76
  return _circleprogress.default;
77
77
  },
78
- Col: function() {
78
+ get Col () {
79
79
  return _col.default;
80
80
  },
81
- Collapse: function() {
81
+ get Collapse () {
82
82
  return _collapse.default;
83
83
  },
84
- CollapseItem: function() {
84
+ get CollapseItem () {
85
85
  return _collapseitem.default;
86
86
  },
87
- ConfigProvider: function() {
87
+ get ConfigProvider () {
88
88
  return _configprovider.default;
89
89
  },
90
- CountDown: function() {
90
+ get CountDown () {
91
91
  return _countdown.default;
92
92
  },
93
- DatePicker: function() {
93
+ get DatePicker () {
94
94
  return _datepicker.default;
95
95
  },
96
- DatePickerView: function() {
96
+ get DatePickerView () {
97
97
  return _datepickerview.default;
98
98
  },
99
- Dialog: function() {
99
+ get Dialog () {
100
100
  return _dialog.default;
101
101
  },
102
- Divider: function() {
102
+ get Divider () {
103
103
  return _divider.default;
104
104
  },
105
- Drag: function() {
105
+ get Drag () {
106
106
  return _drag.default;
107
107
  },
108
- Elevator: function() {
108
+ get Elevator () {
109
109
  return _elevator.default;
110
110
  },
111
- Ellipsis: function() {
111
+ get Ellipsis () {
112
112
  return _ellipsis.default;
113
113
  },
114
- Empty: function() {
114
+ get Empty () {
115
115
  return _empty.default;
116
116
  },
117
- FixedNav: function() {
117
+ get FixedNav () {
118
118
  return _fixednav.default;
119
119
  },
120
- Form: function() {
120
+ get Form () {
121
121
  return _form.default;
122
122
  },
123
- FormItem: function() {
123
+ get FormItem () {
124
124
  return _formitem.default;
125
125
  },
126
- Grid: function() {
126
+ get Grid () {
127
127
  return _grid.default;
128
128
  },
129
- GridItem: function() {
129
+ get GridItem () {
130
130
  return _griditem.default;
131
131
  },
132
- HoverButton: function() {
132
+ get HoverButton () {
133
133
  return _hoverbutton.default;
134
134
  },
135
- HoverButtonItem: function() {
135
+ get HoverButtonItem () {
136
136
  return _hoverbuttonitem.default;
137
137
  },
138
- Image: function() {
138
+ get Image () {
139
139
  return _image.default;
140
140
  },
141
- ImagePreview: function() {
141
+ get ImagePreview () {
142
142
  return _imagepreview.default;
143
143
  },
144
- Indicator: function() {
144
+ get Indicator () {
145
145
  return _indicator.default;
146
146
  },
147
- InfiniteLoading: function() {
147
+ get InfiniteLoading () {
148
148
  return _infiniteloading.default;
149
149
  },
150
- Input: function() {
150
+ get Input () {
151
151
  return _input.default;
152
152
  },
153
- InputNumber: function() {
153
+ get InputNumber () {
154
154
  return _inputnumber.default;
155
155
  },
156
- Layout: function() {
156
+ get Layout () {
157
157
  return _layout.default;
158
158
  },
159
- Loading: function() {
159
+ get Loading () {
160
160
  return _loading.default;
161
161
  },
162
- Lottie: function() {
162
+ get Lottie () {
163
163
  return _lottie.default;
164
164
  },
165
- Menu: function() {
165
+ get Menu () {
166
166
  return _menu.default;
167
167
  },
168
- MenuItem: function() {
168
+ get MenuItem () {
169
169
  return _menuitem.default;
170
170
  },
171
- NavBar: function() {
171
+ get NavBar () {
172
172
  return _navbar.default;
173
173
  },
174
- NoticeBar: function() {
174
+ get NoticeBar () {
175
175
  return _noticebar.default;
176
176
  },
177
- Notify: function() {
177
+ get Notify () {
178
178
  return _notify.default;
179
179
  },
180
- NumberKeyboard: function() {
180
+ get NumberKeyboard () {
181
181
  return _numberkeyboard.default;
182
182
  },
183
- Overlay: function() {
183
+ get Overlay () {
184
184
  return _overlay.default;
185
185
  },
186
- Pagination: function() {
186
+ get Pagination () {
187
187
  return _pagination.default;
188
188
  },
189
- Picker: function() {
189
+ get Picker () {
190
190
  return _picker.default;
191
191
  },
192
- PickerView: function() {
192
+ get PickerView () {
193
193
  return _pickerview.default;
194
194
  },
195
- Popover: function() {
195
+ get Popover () {
196
196
  return _popover.default;
197
197
  },
198
- Popup: function() {
198
+ get Popup () {
199
199
  return _popup.default;
200
200
  },
201
- Price: function() {
201
+ get Price () {
202
202
  return _price.default;
203
203
  },
204
- Progress: function() {
204
+ get Progress () {
205
205
  return _progress.default;
206
206
  },
207
- PullToRefresh: function() {
207
+ get PullToRefresh () {
208
208
  return _pulltorefresh.default;
209
209
  },
210
- Radio: function() {
210
+ get Radio () {
211
211
  return _radio.default;
212
212
  },
213
- RadioGroup: function() {
213
+ get RadioGroup () {
214
214
  return _radiogroup.default;
215
215
  },
216
- Range: function() {
216
+ get Range () {
217
217
  return _range.default;
218
218
  },
219
- Rate: function() {
219
+ get Rate () {
220
220
  return _rate.default;
221
221
  },
222
- ResultPage: function() {
222
+ get ResultPage () {
223
223
  return _resultpage.default;
224
224
  },
225
- Row: function() {
225
+ get Row () {
226
226
  return _row.default;
227
227
  },
228
- SafeArea: function() {
228
+ get SafeArea () {
229
229
  return _safearea.default;
230
230
  },
231
- SearchBar: function() {
231
+ get SearchBar () {
232
232
  return _searchbar.default;
233
233
  },
234
- Segmented: function() {
234
+ get Segmented () {
235
235
  return _segmented.default;
236
236
  },
237
- ShortPassword: function() {
237
+ get ShortPassword () {
238
238
  return _shortpassword.default;
239
239
  },
240
- SideBar: function() {
240
+ get SideBar () {
241
241
  return _sidebar.default;
242
242
  },
243
- SideBarItem: function() {
243
+ get SideBarItem () {
244
244
  return _sidebaritem.default;
245
245
  },
246
- Signature: function() {
246
+ get Signature () {
247
247
  return _signature.default;
248
248
  },
249
- Skeleton: function() {
249
+ get Skeleton () {
250
250
  return _skeleton.default;
251
251
  },
252
- Space: function() {
252
+ get Space () {
253
253
  return _space.default;
254
254
  },
255
- Step: function() {
255
+ get Step () {
256
256
  return _step.default;
257
257
  },
258
- Steps: function() {
258
+ get Steps () {
259
259
  return _steps.default;
260
260
  },
261
- Sticky: function() {
261
+ get Sticky () {
262
262
  return _sticky.default;
263
263
  },
264
- Swipe: function() {
264
+ get Swipe () {
265
265
  return _swipe.default;
266
266
  },
267
- Swiper: function() {
267
+ get Swiper () {
268
268
  return _swiper.default;
269
269
  },
270
- SwiperItem: function() {
270
+ get SwiperItem () {
271
271
  return _swiperitem.default;
272
272
  },
273
- Switch: function() {
273
+ get Switch () {
274
274
  return _switch.default;
275
275
  },
276
- TabPane: function() {
276
+ get TabPane () {
277
277
  return _tabpane.default;
278
278
  },
279
- Tabbar: function() {
279
+ get Tabbar () {
280
280
  return _tabbar.default;
281
281
  },
282
- TabbarItem: function() {
282
+ get TabbarItem () {
283
283
  return _tabbaritem.default;
284
284
  },
285
- Table: function() {
285
+ get Table () {
286
286
  return _table.default;
287
287
  },
288
- Tabs: function() {
288
+ get Tabs () {
289
289
  return _tabs.default;
290
290
  },
291
- Tag: function() {
291
+ get Tag () {
292
292
  return _tag.default;
293
293
  },
294
- TextArea: function() {
294
+ get TextArea () {
295
295
  return _textarea.default;
296
296
  },
297
- TimeDetail: function() {
297
+ get TimeDetail () {
298
298
  return _timedetail.default;
299
299
  },
300
- TimeSelect: function() {
300
+ get TimeSelect () {
301
301
  return _timeselect.default;
302
302
  },
303
- Toast: function() {
303
+ get Toast () {
304
304
  return _toast.default;
305
305
  },
306
- Tour: function() {
306
+ get Tour () {
307
307
  return _tour.default;
308
308
  },
309
- TrendArrow: function() {
309
+ get TrendArrow () {
310
310
  return _trendarrow.default;
311
311
  },
312
- Uploader: function() {
312
+ get Uploader () {
313
313
  return _uploader.default;
314
314
  },
315
- Video: function() {
315
+ get Video () {
316
316
  return _video.default;
317
317
  },
318
- VirtualList: function() {
318
+ get VirtualList () {
319
319
  return _virtuallist.default;
320
320
  },
321
- WaterMark: function() {
321
+ get WaterMark () {
322
322
  return _watermark.default;
323
323
  }
324
324
  });
@@ -5,14 +5,14 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- Overlay: function() {
12
+ get Overlay () {
13
13
  return Overlay;
14
14
  },
15
- defaultOverlayProps: function() {
15
+ get defaultOverlayProps () {
16
16
  return defaultOverlayProps;
17
17
  }
18
18
  });
@@ -65,8 +65,7 @@ var InternalPickerView = function InternalPickerView(props, ref) {
65
65
  var index = currentOptions.findIndex(function(columnItem) {
66
66
  return columnItem.value === currentValue;
67
67
  });
68
- columnOptions = currentOptions[index === -1 ? 0 : index] // 如果未找到,默认取第一个
69
- ;
68
+ columnOptions = currentOptions[index === -1 ? 0 : index]; // 如果未找到,默认取第一个
70
69
  } else {
71
70
  return "break" // 如果 currentValue 不存在,终止循环
72
71
  ;
@@ -5,14 +5,14 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- momentum: function() {
12
+ get momentum () {
13
13
  return momentum;
14
14
  },
15
- useStyles: function() {
15
+ get useStyles () {
16
16
  return useStyles;
17
17
  }
18
18
  });
@@ -1,3 +1,3 @@
1
1
  import React, { FunctionComponent } from 'react';
2
2
  import { WebPopupProps } from "../../types";
3
- export declare const Popup: FunctionComponent<Partial<WebPopupProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'title'>>;
3
+ export declare const Popup: FunctionComponent<Partial<WebPopupProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'title' | 'onTouchStart' | 'onTouchMove' | 'onTouchEnd'>>;
@@ -34,6 +34,8 @@ var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _overla
34
34
  portal: null,
35
35
  overlay: true,
36
36
  round: false,
37
+ resizable: false,
38
+ minHeight: '',
37
39
  onOpen: function onOpen() {},
38
40
  onClose: function onClose() {},
39
41
  onOverlayClick: function onOverlayClick() {
@@ -41,28 +43,42 @@ var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _overla
41
43
  },
42
44
  onCloseIconClick: function onCloseIconClick() {
43
45
  return true;
44
- }
46
+ },
47
+ onTouchStart: function onTouchStart() {},
48
+ onTouchMove: function onTouchMove() {},
49
+ onTouchEnd: function onTouchEnd() {}
45
50
  });
46
51
  // 默认1000,参看variables
47
52
  var _zIndex = 1100;
48
53
  var Popup = function Popup(props) {
49
- var _$_object_spread = (0, _object_spread._)({}, defaultProps, props), children = _$_object_spread.children, visible = _$_object_spread.visible, overlay = _$_object_spread.overlay, closeOnOverlayClick = _$_object_spread.closeOnOverlayClick, overlayStyle = _$_object_spread.overlayStyle, overlayClassName = _$_object_spread.overlayClassName, zIndex = _$_object_spread.zIndex, lockScroll = _$_object_spread.lockScroll, duration = _$_object_spread.duration, closeable = _$_object_spread.closeable, closeIconPosition = _$_object_spread.closeIconPosition, closeIcon = _$_object_spread.closeIcon, left = _$_object_spread.left, title = _$_object_spread.title, description = _$_object_spread.description, style = _$_object_spread.style, transition = _$_object_spread.transition, round = _$_object_spread.round, position = _$_object_spread.position, className = _$_object_spread.className, destroyOnClose = _$_object_spread.destroyOnClose, portal = _$_object_spread.portal, onOpen = _$_object_spread.onOpen, onClose = _$_object_spread.onClose, onOverlayClick = _$_object_spread.onOverlayClick, onCloseIconClick = _$_object_spread.onCloseIconClick, afterShow = _$_object_spread.afterShow, afterClose = _$_object_spread.afterClose, onClick = _$_object_spread.onClick;
54
+ var _$_object_spread = (0, _object_spread._)({}, defaultProps, props), children = _$_object_spread.children, visible = _$_object_spread.visible, overlay = _$_object_spread.overlay, closeOnOverlayClick = _$_object_spread.closeOnOverlayClick, overlayStyle = _$_object_spread.overlayStyle, overlayClassName = _$_object_spread.overlayClassName, zIndex = _$_object_spread.zIndex, lockScroll = _$_object_spread.lockScroll, duration = _$_object_spread.duration, closeable = _$_object_spread.closeable, closeIconPosition = _$_object_spread.closeIconPosition, closeIcon = _$_object_spread.closeIcon, left = _$_object_spread.left, title = _$_object_spread.title, description = _$_object_spread.description, style = _$_object_spread.style, transition = _$_object_spread.transition, round = _$_object_spread.round, position = _$_object_spread.position, className = _$_object_spread.className, destroyOnClose = _$_object_spread.destroyOnClose, portal = _$_object_spread.portal, resizable = _$_object_spread.resizable, minHeight = _$_object_spread.minHeight, onOpen = _$_object_spread.onOpen, onClose = _$_object_spread.onClose, onOverlayClick = _$_object_spread.onOverlayClick, onCloseIconClick = _$_object_spread.onCloseIconClick, afterShow = _$_object_spread.afterShow, afterClose = _$_object_spread.afterClose, onClick = _$_object_spread.onClick, onTouchStart = _$_object_spread.onTouchStart, onTouchMove = _$_object_spread.onTouchMove, onTouchEnd = _$_object_spread.onTouchEnd;
50
55
  var nodeRef = _react.default.useRef(null);
51
56
  var innerIndex = zIndex || _zIndex;
52
57
  var _useState = (0, _sliced_to_array._)((0, _react.useState)(innerIndex), 2), index = _useState[0], setIndex = _useState[1];
53
58
  var _useState1 = (0, _sliced_to_array._)((0, _react.useState)(visible), 2), innerVisible = _useState1[0], setInnerVisible = _useState1[1];
54
59
  var _useState2 = (0, _sliced_to_array._)((0, _react.useState)(true), 2), showChildren = _useState2[0], setShowChildren = _useState2[1];
55
60
  var _useState3 = (0, _sliced_to_array._)((0, _react.useState)(''), 2), transitionName = _useState3[0], setTransitionName = _useState3[1];
61
+ var touchStartRef = (0, _react.useRef)(0);
62
+ var touchMoveDistanceRef = (0, _react.useRef)(0);
63
+ var heightRef = (0, _react.useRef)(0);
64
+ // 首次可调整时记录的默认高度
65
+ var defaultHeightRef = (0, _react.useRef)(0);
66
+ var isTouching = (0, _react.useRef)(false);
56
67
  (0, _uselockscroll.useLockScroll)(nodeRef, innerVisible && lockScroll);
57
68
  var classPrefix = 'nut-popup';
58
69
  var overlayStyles = (0, _object_spread._)({}, overlayStyle);
59
70
  var popStyles = (0, _object_spread_props._)((0, _object_spread._)({}, style), {
60
- zIndex: index
71
+ zIndex: index,
72
+ minHeight: minHeight
61
73
  });
62
74
  var _obj;
63
75
  var popClassName = (0, _classnames.default)(classPrefix, (_obj = {}, (0, _define_property._)(_obj, "".concat(classPrefix, "-round"), round || position === 'bottom'), (0, _define_property._)(_obj, "".concat(classPrefix, "-").concat(position), true), _obj), className);
64
76
  var open = function open() {
65
77
  if (!innerVisible) {
78
+ // 当高度改变后,再次打开时,将高度置为初始高度
79
+ if (position === 'bottom' && resizable && nodeRef.current && heightRef.current) {
80
+ nodeRef.current.style.height = "".concat(defaultHeightRef.current, "px");
81
+ }
66
82
  setInnerVisible(true);
67
83
  setIndex(++innerIndex);
68
84
  }
@@ -116,6 +132,41 @@ var Popup = function Popup(props) {
116
132
  return renderCloseIcon();
117
133
  }
118
134
  };
135
+ var handleTouchStart = function handleTouchStart(event) {
136
+ var _nodeRef_current;
137
+ if (position !== 'bottom' || !resizable || !nodeRef.current) return;
138
+ // 开始touch,记录下touch的pageY,用以判断是向上滑动还是向下滑动
139
+ touchStartRef.current = event.touches[0].pageY;
140
+ // 标记开始滑动
141
+ isTouching.current = true;
142
+ // 标记当前popup的高度
143
+ heightRef.current = ((_nodeRef_current = nodeRef.current) === null || _nodeRef_current === void 0 ? void 0 : _nodeRef_current.offsetHeight) || 0;
144
+ if (!defaultHeightRef.current) defaultHeightRef.current = heightRef.current;
145
+ onTouchStart === null || onTouchStart === void 0 ? void 0 : onTouchStart(heightRef.current, event);
146
+ };
147
+ var handleTouchMove = function handleTouchMove(event) {
148
+ if (position !== 'bottom' || !resizable || !nodeRef.current) return;
149
+ event.stopPropagation();
150
+ // move过程中,当前的pageY 与 start值比较
151
+ touchMoveDistanceRef.current = event.touches[0].pageY - touchStartRef.current;
152
+ var min = typeof minHeight === 'number' ? minHeight : parseInt(String(minHeight || 0), 10) || 0;
153
+ var currentHeight = Math.max(min, heightRef.current - touchMoveDistanceRef.current);
154
+ nodeRef.current.style.height = "".concat(currentHeight, "px");
155
+ // 向下滑动
156
+ if (touchMoveDistanceRef.current > 0) {
157
+ onTouchMove === null || onTouchMove === void 0 ? void 0 : onTouchMove(currentHeight, event, 'down');
158
+ } else {
159
+ // 向上滑动
160
+ onTouchMove === null || onTouchMove === void 0 ? void 0 : onTouchMove(currentHeight, event, 'up');
161
+ }
162
+ };
163
+ var handleTouchEnd = function handleTouchEnd(event) {
164
+ if (position !== 'bottom' || !resizable || !nodeRef.current) return;
165
+ isTouching.current = false;
166
+ var min = typeof minHeight === 'number' ? minHeight : parseInt(String(minHeight || 0), 10) || 0;
167
+ var currentHeight = Math.max(min, heightRef.current - touchMoveDistanceRef.current);
168
+ onTouchEnd === null || onTouchEnd === void 0 ? void 0 : onTouchEnd(currentHeight, event);
169
+ };
119
170
  var renderPop = function renderPop() {
120
171
  return /*#__PURE__*/ _react.default.createElement(_reacttransitiongroup.CSSTransition, {
121
172
  nodeRef: nodeRef,
@@ -130,7 +181,11 @@ var Popup = function Popup(props) {
130
181
  ref: nodeRef,
131
182
  style: popStyles,
132
183
  className: popClassName,
133
- onClick: onClick
184
+ onClick: onClick,
185
+ onTouchStart: handleTouchStart,
186
+ onTouchMove: handleTouchMove,
187
+ onTouchEnd: handleTouchEnd,
188
+ onTouchCancel: handleTouchEnd
134
189
  }, renderTitle(), showChildren && children));
135
190
  };
136
191
  var renderNode = function renderNode() {
@@ -88,11 +88,6 @@
88
88
  }
89
89
  }
90
90
 
91
- &-bottom,
92
- &-top {
93
- max-height: 87%;
94
- }
95
-
96
91
  &-bottom {
97
92
  bottom: 0;
98
93
  left: 0;
@@ -80,9 +80,6 @@
80
80
  .nut-popup-center.nut-popup-round {
81
81
  border-radius: var(--nutui-popup-border-radius, var(--nutui-radius-xl, 12px));
82
82
  }
83
- .nut-popup-bottom, .nut-popup-top {
84
- max-height: 87%;
85
- }
86
83
  .nut-popup-bottom {
87
84
  bottom: 0;
88
85
  left: 0;
@@ -88,11 +88,6 @@
88
88
  }
89
89
  }
90
90
 
91
- &-bottom,
92
- &-top {
93
- max-height: 87%;
94
- }
95
-
96
91
  &-bottom {
97
92
  bottom: 0;
98
93
  left: 0;
@@ -80,9 +80,6 @@
80
80
  .nut-popup-center.nut-popup-round {
81
81
  border-radius: var(--nutui-popup-border-radius, 12px);
82
82
  }
83
- .nut-popup-bottom, .nut-popup-top {
84
- max-height: 87%;
85
- }
86
83
  .nut-popup-bottom {
87
84
  bottom: 0;
88
85
  left: 0;
@@ -88,11 +88,6 @@
88
88
  }
89
89
  }
90
90
 
91
- &-bottom,
92
- &-top {
93
- max-height: 87%;
94
- }
95
-
96
91
  &-bottom {
97
92
  bottom: 0;
98
93
  left: 0;
@@ -80,9 +80,6 @@
80
80
  .nut-popup-center.nut-popup-round {
81
81
  border-radius: var(--nutui-popup-border-radius, 12px);
82
82
  }
83
- .nut-popup-bottom, .nut-popup-top {
84
- max-height: 87%;
85
- }
86
83
  .nut-popup-bottom {
87
84
  bottom: 0;
88
85
  left: 0;