antd-mobile 5.18.0 → 5.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/2x/bundle/antd-mobile.cjs.js +47 -18976
  2. package/2x/bundle/antd-mobile.compatible.umd.js +25911 -0
  3. package/2x/bundle/antd-mobile.es.js +16358 -16685
  4. package/2x/bundle/antd-mobile.umd.js +64 -0
  5. package/2x/bundle/style.css +359 -273
  6. package/2x/cjs/components/action-sheet/action-sheet.d.ts +1 -1
  7. package/2x/cjs/components/button/button.js +1 -1
  8. package/2x/cjs/components/calendar/calendar.d.ts +1 -1
  9. package/2x/cjs/components/cascader/cascader.d.ts +2 -0
  10. package/2x/cjs/components/cascader/index.d.ts +1 -0
  11. package/2x/cjs/components/cascader-view/cascader-view.d.ts +2 -1
  12. package/2x/cjs/components/cascader-view/cascader-view.js +2 -1
  13. package/2x/cjs/components/dialog/show.d.ts +1 -1
  14. package/2x/cjs/components/form/context.d.ts +1 -1
  15. package/2x/cjs/components/form/form-item.d.ts +1 -1
  16. package/2x/cjs/components/form/form-item.js +3 -0
  17. package/2x/cjs/components/image/test/image.test.js +57 -8
  18. package/2x/cjs/components/image-viewer/slide.js +75 -56
  19. package/2x/cjs/components/input/input.js +9 -2
  20. package/2x/cjs/components/modal/show.d.ts +1 -1
  21. package/2x/cjs/components/number-keyboard/number-keyboard.css +11 -15
  22. package/2x/cjs/components/number-keyboard/number-keyboard.d.ts +1 -1
  23. package/2x/cjs/components/number-keyboard/number-keyboard.js +19 -17
  24. package/2x/cjs/components/passcode-input/index.d.ts +1 -1
  25. package/2x/cjs/components/passcode-input/passcode-input.css +12 -12
  26. package/2x/cjs/components/passcode-input/passcode-input.js +16 -8
  27. package/2x/cjs/components/picker-view/wheel.js +2 -0
  28. package/2x/cjs/components/rate/rate.css +4 -0
  29. package/2x/cjs/components/rate/rate.js +42 -13
  30. package/2x/cjs/components/result/result.d.ts +1 -1
  31. package/2x/cjs/components/result/result.js +7 -1
  32. package/2x/cjs/components/result-page/index.d.ts +7 -0
  33. package/2x/cjs/components/result-page/index.js +20 -0
  34. package/2x/cjs/components/result-page/result-page-card.d.ts +6 -0
  35. package/2x/cjs/components/result-page/result-page-card.js +24 -0
  36. package/2x/cjs/components/result-page/result-page.css +130 -0
  37. package/2x/cjs/components/result-page/result-page.d.ts +23 -0
  38. package/2x/cjs/components/result-page/result-page.js +108 -0
  39. package/2x/cjs/components/search-bar/search-bar.js +12 -2
  40. package/2x/cjs/components/swipe-action/swipe-action.d.ts +2 -0
  41. package/2x/cjs/components/swipe-action/swipe-action.js +34 -6
  42. package/2x/cjs/components/swiper/swiper.js +15 -1
  43. package/2x/cjs/index.d.ts +1 -0
  44. package/2x/cjs/index.js +8 -0
  45. package/2x/cjs/locales/base.d.ts +9 -0
  46. package/2x/cjs/locales/base.js +9 -0
  47. package/2x/cjs/locales/en-US.d.ts +9 -0
  48. package/2x/cjs/locales/es-ES.d.ts +9 -0
  49. package/2x/cjs/locales/fa-IR.d.ts +9 -0
  50. package/2x/cjs/locales/fr-FR.d.ts +9 -0
  51. package/2x/cjs/locales/id-ID.d.ts +9 -0
  52. package/2x/cjs/locales/id-ID.js +13 -0
  53. package/2x/cjs/locales/kk-KZ.d.ts +9 -0
  54. package/2x/cjs/locales/ko-KR.d.ts +9 -0
  55. package/2x/cjs/locales/zh-CN.d.ts +9 -0
  56. package/2x/cjs/locales/zh-CN.js +9 -0
  57. package/2x/cjs/locales/zh-HK.d.ts +9 -0
  58. package/2x/cjs/locales/zh-TW.d.ts +9 -0
  59. package/2x/cjs/utils/matrix.d.ts +10 -0
  60. package/2x/cjs/utils/matrix.js +60 -0
  61. package/2x/cjs/utils/use-resize-effect.js +3 -1
  62. package/2x/es/components/action-sheet/action-sheet.d.ts +1 -1
  63. package/2x/es/components/button/button.js +1 -1
  64. package/2x/es/components/calendar/calendar.d.ts +1 -1
  65. package/2x/es/components/cascader/cascader.d.ts +2 -0
  66. package/2x/es/components/cascader/index.d.ts +1 -0
  67. package/2x/es/components/cascader-view/cascader-view.d.ts +2 -1
  68. package/2x/es/components/cascader-view/cascader-view.js +2 -1
  69. package/2x/es/components/dialog/show.d.ts +1 -1
  70. package/2x/es/components/form/context.d.ts +1 -1
  71. package/2x/es/components/form/form-item.d.ts +1 -1
  72. package/2x/es/components/form/form-item.js +3 -0
  73. package/2x/es/components/image/test/image.test.js +54 -8
  74. package/2x/es/components/image-viewer/slide.js +73 -56
  75. package/2x/es/components/input/input.js +8 -2
  76. package/2x/es/components/modal/show.d.ts +1 -1
  77. package/2x/es/components/number-keyboard/number-keyboard.css +11 -15
  78. package/2x/es/components/number-keyboard/number-keyboard.d.ts +1 -1
  79. package/2x/es/components/number-keyboard/number-keyboard.js +19 -17
  80. package/2x/es/components/passcode-input/index.d.ts +1 -1
  81. package/2x/es/components/passcode-input/passcode-input.css +12 -12
  82. package/2x/es/components/passcode-input/passcode-input.js +15 -8
  83. package/2x/es/components/picker-view/wheel.js +2 -0
  84. package/2x/es/components/rate/rate.css +4 -0
  85. package/2x/es/components/rate/rate.js +36 -13
  86. package/2x/es/components/result/result.d.ts +1 -1
  87. package/2x/es/components/result/result.js +6 -1
  88. package/2x/es/components/result-page/index.d.ts +7 -0
  89. package/2x/es/components/result-page/index.js +7 -0
  90. package/2x/es/components/result-page/result-page-card.d.ts +6 -0
  91. package/2x/es/components/result-page/result-page-card.js +9 -0
  92. package/2x/es/components/result-page/result-page.css +130 -0
  93. package/2x/es/components/result-page/result-page.d.ts +23 -0
  94. package/2x/es/components/result-page/result-page.js +83 -0
  95. package/2x/es/components/search-bar/search-bar.js +12 -2
  96. package/2x/es/components/swipe-action/swipe-action.d.ts +2 -0
  97. package/2x/es/components/swipe-action/swipe-action.js +34 -6
  98. package/2x/es/components/swiper/swiper.js +15 -1
  99. package/2x/es/index.d.ts +1 -0
  100. package/2x/es/index.js +1 -0
  101. package/2x/es/locales/base.d.ts +9 -0
  102. package/2x/es/locales/base.js +9 -0
  103. package/2x/es/locales/en-US.d.ts +9 -0
  104. package/2x/es/locales/es-ES.d.ts +9 -0
  105. package/2x/es/locales/fa-IR.d.ts +9 -0
  106. package/2x/es/locales/fr-FR.d.ts +9 -0
  107. package/2x/es/locales/id-ID.d.ts +9 -0
  108. package/2x/es/locales/id-ID.js +13 -0
  109. package/2x/es/locales/kk-KZ.d.ts +9 -0
  110. package/2x/es/locales/ko-KR.d.ts +9 -0
  111. package/2x/es/locales/zh-CN.d.ts +9 -0
  112. package/2x/es/locales/zh-CN.js +9 -0
  113. package/2x/es/locales/zh-HK.d.ts +9 -0
  114. package/2x/es/locales/zh-TW.d.ts +9 -0
  115. package/2x/es/utils/matrix.d.ts +10 -0
  116. package/2x/es/utils/matrix.js +27 -0
  117. package/2x/es/utils/use-resize-effect.js +3 -1
  118. package/2x/package.json +6 -6
  119. package/2x/umd/antd-mobile.js +25911 -2
  120. package/bundle/antd-mobile.cjs.js +47 -18976
  121. package/bundle/antd-mobile.compatible.umd.js +25911 -0
  122. package/bundle/antd-mobile.es.js +16358 -16685
  123. package/bundle/antd-mobile.umd.js +64 -0
  124. package/bundle/style.css +1 -4088
  125. package/cjs/components/action-sheet/action-sheet.d.ts +1 -1
  126. package/cjs/components/button/button.js +1 -1
  127. package/cjs/components/calendar/calendar.d.ts +1 -1
  128. package/cjs/components/cascader/cascader.d.ts +2 -0
  129. package/cjs/components/cascader/index.d.ts +1 -0
  130. package/cjs/components/cascader-view/cascader-view.d.ts +2 -1
  131. package/cjs/components/cascader-view/cascader-view.js +2 -1
  132. package/cjs/components/dialog/show.d.ts +1 -1
  133. package/cjs/components/form/context.d.ts +1 -1
  134. package/cjs/components/form/form-item.d.ts +1 -1
  135. package/cjs/components/form/form-item.js +3 -0
  136. package/cjs/components/image/test/image.test.js +57 -8
  137. package/cjs/components/image-viewer/slide.js +75 -56
  138. package/cjs/components/input/input.js +9 -2
  139. package/cjs/components/modal/show.d.ts +1 -1
  140. package/cjs/components/number-keyboard/number-keyboard.css +11 -14
  141. package/cjs/components/number-keyboard/number-keyboard.d.ts +1 -1
  142. package/cjs/components/number-keyboard/number-keyboard.js +19 -17
  143. package/cjs/components/passcode-input/index.d.ts +1 -1
  144. package/cjs/components/passcode-input/passcode-input.css +12 -12
  145. package/cjs/components/passcode-input/passcode-input.js +16 -8
  146. package/cjs/components/picker-view/wheel.js +2 -0
  147. package/cjs/components/rate/rate.css +4 -0
  148. package/cjs/components/rate/rate.js +42 -13
  149. package/cjs/components/result/result.d.ts +1 -1
  150. package/cjs/components/result/result.js +7 -1
  151. package/cjs/components/result-page/index.d.ts +7 -0
  152. package/cjs/components/result-page/index.js +20 -0
  153. package/cjs/components/result-page/result-page-card.d.ts +6 -0
  154. package/cjs/components/result-page/result-page-card.js +24 -0
  155. package/cjs/components/result-page/result-page.css +113 -0
  156. package/cjs/components/result-page/result-page.d.ts +23 -0
  157. package/cjs/components/result-page/result-page.js +108 -0
  158. package/cjs/components/search-bar/search-bar.js +12 -2
  159. package/cjs/components/swipe-action/swipe-action.d.ts +2 -0
  160. package/cjs/components/swipe-action/swipe-action.js +34 -6
  161. package/cjs/components/swiper/swiper.js +15 -1
  162. package/cjs/index.d.ts +1 -0
  163. package/cjs/index.js +8 -0
  164. package/cjs/locales/base.d.ts +9 -0
  165. package/cjs/locales/base.js +9 -0
  166. package/cjs/locales/en-US.d.ts +9 -0
  167. package/cjs/locales/es-ES.d.ts +9 -0
  168. package/cjs/locales/fa-IR.d.ts +9 -0
  169. package/cjs/locales/fr-FR.d.ts +9 -0
  170. package/cjs/locales/id-ID.d.ts +9 -0
  171. package/cjs/locales/id-ID.js +13 -0
  172. package/cjs/locales/kk-KZ.d.ts +9 -0
  173. package/cjs/locales/ko-KR.d.ts +9 -0
  174. package/cjs/locales/zh-CN.d.ts +9 -0
  175. package/cjs/locales/zh-CN.js +9 -0
  176. package/cjs/locales/zh-HK.d.ts +9 -0
  177. package/cjs/locales/zh-TW.d.ts +9 -0
  178. package/cjs/utils/matrix.d.ts +10 -0
  179. package/cjs/utils/matrix.js +60 -0
  180. package/cjs/utils/use-resize-effect.js +3 -1
  181. package/es/components/action-sheet/action-sheet.d.ts +1 -1
  182. package/es/components/button/button.js +1 -1
  183. package/es/components/calendar/calendar.d.ts +1 -1
  184. package/es/components/cascader/cascader.d.ts +2 -0
  185. package/es/components/cascader/index.d.ts +1 -0
  186. package/es/components/cascader-view/cascader-view.d.ts +2 -1
  187. package/es/components/cascader-view/cascader-view.js +2 -1
  188. package/es/components/dialog/show.d.ts +1 -1
  189. package/es/components/form/context.d.ts +1 -1
  190. package/es/components/form/form-item.d.ts +1 -1
  191. package/es/components/form/form-item.js +3 -0
  192. package/es/components/image/test/image.test.js +54 -8
  193. package/es/components/image-viewer/slide.js +73 -56
  194. package/es/components/input/input.js +8 -2
  195. package/es/components/modal/show.d.ts +1 -1
  196. package/es/components/number-keyboard/number-keyboard.css +11 -14
  197. package/es/components/number-keyboard/number-keyboard.d.ts +1 -1
  198. package/es/components/number-keyboard/number-keyboard.js +19 -17
  199. package/es/components/passcode-input/index.d.ts +1 -1
  200. package/es/components/passcode-input/passcode-input.css +12 -12
  201. package/es/components/passcode-input/passcode-input.js +15 -8
  202. package/es/components/picker-view/wheel.js +2 -0
  203. package/es/components/rate/rate.css +4 -0
  204. package/es/components/rate/rate.js +36 -13
  205. package/es/components/result/result.d.ts +1 -1
  206. package/es/components/result/result.js +6 -1
  207. package/es/components/result-page/index.d.ts +7 -0
  208. package/es/components/result-page/index.js +7 -0
  209. package/es/components/result-page/result-page-card.d.ts +6 -0
  210. package/es/components/result-page/result-page-card.js +9 -0
  211. package/es/components/result-page/result-page.css +113 -0
  212. package/es/components/result-page/result-page.d.ts +23 -0
  213. package/es/components/result-page/result-page.js +83 -0
  214. package/es/components/search-bar/search-bar.js +12 -2
  215. package/es/components/swipe-action/swipe-action.d.ts +2 -0
  216. package/es/components/swipe-action/swipe-action.js +34 -6
  217. package/es/components/swiper/swiper.js +15 -1
  218. package/es/index.d.ts +1 -0
  219. package/es/index.js +1 -0
  220. package/es/locales/base.d.ts +9 -0
  221. package/es/locales/base.js +9 -0
  222. package/es/locales/en-US.d.ts +9 -0
  223. package/es/locales/es-ES.d.ts +9 -0
  224. package/es/locales/fa-IR.d.ts +9 -0
  225. package/es/locales/fr-FR.d.ts +9 -0
  226. package/es/locales/id-ID.d.ts +9 -0
  227. package/es/locales/id-ID.js +13 -0
  228. package/es/locales/kk-KZ.d.ts +9 -0
  229. package/es/locales/ko-KR.d.ts +9 -0
  230. package/es/locales/zh-CN.d.ts +9 -0
  231. package/es/locales/zh-CN.js +9 -0
  232. package/es/locales/zh-HK.d.ts +9 -0
  233. package/es/locales/zh-TW.d.ts +9 -0
  234. package/es/utils/matrix.d.ts +10 -0
  235. package/es/utils/matrix.js +27 -0
  236. package/es/utils/use-resize-effect.js +3 -1
  237. package/package.json +6 -6
  238. package/umd/antd-mobile.js +1 -1
  239. package/2x/umd/antd-mobile.js.LICENSE.txt +0 -35
@@ -65,8 +65,26 @@ const SwipeAction = (0, _react.forwardRef)((p, ref) => {
65
65
  }
66
66
  }), []);
67
67
  const draggingRef = (0, _react.useRef)(false);
68
+ const dragCancelRef = (0, _react.useRef)(null);
69
+
70
+ function forceCancelDrag() {
71
+ var _a;
72
+
73
+ (_a = dragCancelRef.current) === null || _a === void 0 ? void 0 : _a.call(dragCancelRef);
74
+ draggingRef.current = false;
75
+ }
76
+
68
77
  const bind = (0, _react2.useDrag)(state => {
69
- draggingRef.current = true;
78
+ var _a;
79
+
80
+ dragCancelRef.current = state.cancel;
81
+ if (!state.intentional) return;
82
+
83
+ if (state.down) {
84
+ draggingRef.current = true;
85
+ }
86
+
87
+ if (!draggingRef.current) return;
70
88
  const [offsetX] = state.offset;
71
89
 
72
90
  if (state.last) {
@@ -82,9 +100,15 @@ const SwipeAction = (0, _react.forwardRef)((p, ref) => {
82
100
  position = 0;
83
101
  }
84
102
 
103
+ const targetX = (0, _nearest.nearest)([-rightWidth, 0, leftWidth], position);
85
104
  api.start({
86
- x: (0, _nearest.nearest)([-rightWidth, 0, leftWidth], position)
105
+ x: targetX
87
106
  });
107
+
108
+ if (targetX !== 0) {
109
+ (_a = p.onActionsReveal) === null || _a === void 0 ? void 0 : _a.call(p, targetX > 0 ? 'left' : 'right');
110
+ }
111
+
88
112
  window.setTimeout(() => {
89
113
  draggingRef.current = false;
90
114
  });
@@ -109,17 +133,21 @@ const SwipeAction = (0, _react.forwardRef)((p, ref) => {
109
133
  preventScroll: true,
110
134
  pointer: {
111
135
  touch: true
112
- }
136
+ },
137
+ triggerAllEvents: true
113
138
  });
114
139
 
115
140
  function close() {
116
141
  api.start({
117
142
  x: 0
118
143
  });
144
+ forceCancelDrag();
119
145
  }
120
146
 
121
147
  (0, _react.useImperativeHandle)(ref, () => ({
122
148
  show: (side = 'right') => {
149
+ var _a;
150
+
123
151
  if (side === 'right') {
124
152
  api.start({
125
153
  x: -getRightWidth()
@@ -129,6 +157,8 @@ const SwipeAction = (0, _react.forwardRef)((p, ref) => {
129
157
  x: getLeftWidth()
130
158
  });
131
159
  }
160
+
161
+ (_a = p.onActionsReveal) === null || _a === void 0 ? void 0 : _a.call(p, side);
132
162
  },
133
163
  close
134
164
  }));
@@ -200,9 +230,7 @@ const SwipeAction = (0, _react.forwardRef)((p, ref) => {
200
230
  if (x.goal !== 0) {
201
231
  e.preventDefault();
202
232
  e.stopPropagation();
203
- api.start({
204
- x: 0
205
- });
233
+ close();
206
234
  }
207
235
  }
208
236
  }, _react.default.createElement(_web.animated.div, {
@@ -141,7 +141,18 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
141
141
  });
142
142
  }
143
143
  }), [count]);
144
+ const dragCancelRef = (0, _react.useRef)(null);
145
+
146
+ function forceCancelDrag() {
147
+ var _a;
148
+
149
+ (_a = dragCancelRef.current) === null || _a === void 0 ? void 0 : _a.call(dragCancelRef);
150
+ draggingRef.current = false;
151
+ }
152
+
144
153
  const bind = (0, _react2.useDrag)(state => {
154
+ dragCancelRef.current = state.cancel;
155
+ if (!state.intentional) return;
145
156
  const slidePixels = getSlidePixels();
146
157
  if (!slidePixels) return;
147
158
  const paramIndex = isVertical ? 1 : 0;
@@ -170,6 +181,7 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
170
181
  const slidePixels = getSlidePixels();
171
182
  return [position.get() / 100 * slidePixels, position.get() / 100 * slidePixels];
172
183
  },
184
+ triggerAllEvents: true,
173
185
  bounds: () => {
174
186
  if (loop) return {};
175
187
  const slidePixels = getSlidePixels();
@@ -233,7 +245,7 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
233
245
  return () => {
234
246
  window.clearInterval(interval);
235
247
  };
236
- }, [autoplay, autoplayInterval, dragging]);
248
+ }, [autoplay, autoplayInterval, dragging, count]);
237
249
 
238
250
  function renderTrackInner() {
239
251
  if (loop) {
@@ -284,6 +296,8 @@ const Swiper = (0, _react.forwardRef)((0, _stagedComponents.staged)((p, ref) =>
284
296
  if (draggingRef.current) {
285
297
  e.stopPropagation();
286
298
  }
299
+
300
+ forceCancelDrag();
287
301
  }
288
302
  }, props.allowTouchMove ? bind() : {}), renderTrackInner()), props.indicator === undefined ? _react.default.createElement("div", {
289
303
  className: `${classPrefix}-indicator`
package/2x/cjs/index.d.ts CHANGED
@@ -56,6 +56,7 @@ export { default as PullToRefresh } from './components/pull-to-refresh';
56
56
  export { default as Radio } from './components/radio';
57
57
  export { default as Rate } from './components/rate';
58
58
  export { default as Result } from './components/result';
59
+ export { default as ResultPage } from './components/result-page';
59
60
  export { default as SafeArea } from './components/safe-area';
60
61
  export { default as ScrollMask } from './components/scroll-mask';
61
62
  export { default as SearchBar } from './components/search-bar';
package/2x/cjs/index.js CHANGED
@@ -339,6 +339,12 @@ Object.defineProperty(exports, "Result", {
339
339
  return _result.default;
340
340
  }
341
341
  });
342
+ Object.defineProperty(exports, "ResultPage", {
343
+ enumerable: true,
344
+ get: function () {
345
+ return _resultPage.default;
346
+ }
347
+ });
342
348
  Object.defineProperty(exports, "SafeArea", {
343
349
  enumerable: true,
344
350
  get: function () {
@@ -610,6 +616,8 @@ var _rate = _interopRequireDefault(require("./components/rate"));
610
616
 
611
617
  var _result = _interopRequireDefault(require("./components/result"));
612
618
 
619
+ var _resultPage = _interopRequireDefault(require("./components/result-page"));
620
+
613
621
  var _safeArea = _interopRequireDefault(require("./components/safe-area"));
614
622
 
615
623
  var _scrollMask = _interopRequireDefault(require("./components/scroll-mask"));
@@ -93,17 +93,26 @@ export declare const base: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -100,17 +100,26 @@ const base = {
100
100
  failedToLoad: 'Failed to load',
101
101
  retry: 'Retry'
102
102
  },
103
+ Input: {
104
+ clear: 'clear'
105
+ },
103
106
  Mask: {
104
107
  name: 'Mask'
105
108
  },
106
109
  Modal: {
107
110
  ok: 'OK'
108
111
  },
112
+ PasscodeInput: {
113
+ name: 'Passcode Input'
114
+ },
109
115
  PullToRefresh: {
110
116
  pulling: 'Scroll down to refresh',
111
117
  canRelease: 'Release to refresh immediately',
112
118
  complete: 'Refresh successful'
113
119
  },
120
+ SearchBar: {
121
+ name: 'Search Bar'
122
+ },
114
123
  Slider: {
115
124
  name: 'Slider'
116
125
  },
@@ -93,17 +93,26 @@ declare const enUS: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -93,17 +93,26 @@ declare const esES: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -93,17 +93,26 @@ declare const faIR: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -93,17 +93,26 @@ declare const frFR: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -93,17 +93,26 @@ declare const idID: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -115,6 +115,19 @@ const idID = (0, _mergeLocale.mergeLocale)(_base.base, {
115
115
  pulling: 'Tarik ke bawah untuk menyegarkan',
116
116
  canRelease: 'Lepaskan untuk menyegarkan segera',
117
117
  complete: 'Segarkan berhasil'
118
+ },
119
+ SearchBar: {
120
+ name: 'Bilah Pencarian'
121
+ },
122
+ Slider: {
123
+ name: 'Penggeser'
124
+ },
125
+ Stepper: {
126
+ decrease: 'mengurangi',
127
+ increase: 'meningkat'
128
+ },
129
+ Switch: {
130
+ name: 'Mengalihkan'
118
131
  }
119
132
  });
120
133
  var _default = idID;
@@ -93,17 +93,26 @@ declare const kkKZ: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -93,17 +93,26 @@ declare const koKR: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -93,17 +93,26 @@ declare const zhCN: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -105,17 +105,26 @@ const zhCN = (0, _mergeLocale.mergeLocale)(_base.base, {
105
105
  failedToLoad: '加载失败',
106
106
  retry: '重新加载'
107
107
  },
108
+ Input: {
109
+ clear: '清除'
110
+ },
108
111
  Mask: {
109
112
  name: '遮罩层'
110
113
  },
111
114
  Modal: {
112
115
  ok: '我知道了'
113
116
  },
117
+ PasscodeInput: {
118
+ name: '密码输入框'
119
+ },
114
120
  PullToRefresh: {
115
121
  pulling: '下拉刷新',
116
122
  canRelease: '释放立即刷新',
117
123
  complete: '刷新成功'
118
124
  },
125
+ SearchBar: {
126
+ name: '搜索框'
127
+ },
119
128
  Slider: {
120
129
  name: '滑动输入条'
121
130
  },
@@ -93,17 +93,26 @@ declare const zhHK: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -93,17 +93,26 @@ declare const zhTW: {
93
93
  failedToLoad: string;
94
94
  retry: string;
95
95
  };
96
+ Input: {
97
+ clear: string;
98
+ };
96
99
  Mask: {
97
100
  name: string;
98
101
  };
99
102
  Modal: {
100
103
  ok: string;
101
104
  };
105
+ PasscodeInput: {
106
+ name: string;
107
+ };
102
108
  PullToRefresh: {
103
109
  pulling: string;
104
110
  canRelease: string;
105
111
  complete: string;
106
112
  };
113
+ SearchBar: {
114
+ name: string;
115
+ };
107
116
  Slider: {
108
117
  name: string;
109
118
  };
@@ -0,0 +1,10 @@
1
+ export declare type Matrix = readonly [number, number, number, number, number, number];
2
+ export declare const create: () => Matrix;
3
+ export declare const getTranslateX: (m: Matrix) => number;
4
+ export declare const getTranslateY: (m: Matrix) => number;
5
+ export declare const getScaleX: (m: Matrix) => number;
6
+ export declare const getScaleY: (m: Matrix) => number;
7
+ export declare const translate: (m: Matrix, x: number, y: number) => Matrix;
8
+ export declare const scale: (m: Matrix, scaleX: number, scaleY?: number) => Matrix;
9
+ export declare const apply: (m: Matrix, [ox, oy]: [number, number]) => [number, number];
10
+ export declare const multiply: (m1: Matrix, m2: Matrix) => Matrix;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.translate = exports.scale = exports.multiply = exports.getTranslateY = exports.getTranslateX = exports.getScaleY = exports.getScaleX = exports.create = exports.apply = void 0;
7
+
8
+ const create = () => {
9
+ return [1, 0, 0, 1, 0, 0];
10
+ };
11
+
12
+ exports.create = create;
13
+
14
+ const getTranslateX = m => {
15
+ return m[4];
16
+ };
17
+
18
+ exports.getTranslateX = getTranslateX;
19
+
20
+ const getTranslateY = m => {
21
+ return m[5];
22
+ };
23
+
24
+ exports.getTranslateY = getTranslateY;
25
+
26
+ const getScaleX = m => {
27
+ return m[0];
28
+ };
29
+
30
+ exports.getScaleX = getScaleX;
31
+
32
+ const getScaleY = m => {
33
+ return m[3];
34
+ };
35
+
36
+ exports.getScaleY = getScaleY;
37
+
38
+ const translate = (m, x, y) => {
39
+ return multiply([1, 0, 0, 1, x, y], m);
40
+ };
41
+
42
+ exports.translate = translate;
43
+
44
+ const scale = (m, scaleX, scaleY = scaleX) => {
45
+ return multiply([scaleX, 0, 0, scaleY, 0, 0], m);
46
+ };
47
+
48
+ exports.scale = scale;
49
+
50
+ const apply = (m, [ox, oy]) => {
51
+ return [m[0] * ox + m[2] * oy + m[4], m[1] * ox + m[3] * oy + m[5]];
52
+ };
53
+
54
+ exports.apply = apply;
55
+
56
+ const multiply = (m1, m2) => {
57
+ return [m1[0] * m2[0] + m1[2] * m2[1], m1[1] * m2[0] + m1[3] * m2[1], m1[0] * m2[2] + m1[2] * m2[3], m1[1] * m2[2] + m1[3] * m2[3], m1[0] * m2[4] + m1[2] * m2[5] + m1[4], m1[1] * m2[4] + m1[3] * m2[5] + m1[5]];
58
+ };
59
+
60
+ exports.multiply = multiply;
@@ -14,11 +14,13 @@ function useResizeEffect(effect, targetRef) {
14
14
  if (!target) return;
15
15
 
16
16
  if (window.ResizeObserver) {
17
+ let animationFrame;
17
18
  const observer = new ResizeObserver(() => {
18
- fn(target);
19
+ animationFrame = window.requestAnimationFrame(() => fn(target));
19
20
  });
20
21
  observer.observe(target);
21
22
  return () => {
23
+ window.cancelAnimationFrame(animationFrame);
22
24
  observer.disconnect();
23
25
  };
24
26
  } else {
@@ -27,4 +27,4 @@ export declare const ActionSheet: FC<ActionSheetProps>;
27
27
  export declare type ActionSheetShowHandler = {
28
28
  close: () => void;
29
29
  };
30
- export declare function showActionSheet(props: Omit<ActionSheetProps, 'visible'>): ActionSheetShowHandler;
30
+ export declare function showActionSheet(props: Omit<ActionSheetProps, 'visible' | 'destroyOnClose' | 'forceRender'>): ActionSheetShowHandler;
@@ -68,5 +68,5 @@ export const Button = forwardRef((p, ref) => {
68
68
  onTouchEnd: props.onTouchEnd
69
69
  }, loading ? React.createElement("div", {
70
70
  className: `${classPrefix}-loading-wrapper`
71
- }, props.loadingIcon, props.loadingText) : props.children));
71
+ }, props.loadingIcon, props.loadingText) : React.createElement("span", null, props.children)));
72
72
  });
@@ -15,7 +15,7 @@ export declare type CalendarProps = {
15
15
  nextYearButton?: React.ReactNode;
16
16
  onPageChange?: (year: number, month: number) => void;
17
17
  weekStartsOn?: 'Monday' | 'Sunday';
18
- renderLabel?: (date: Date) => string | null | undefined;
18
+ renderLabel?: (date: Date) => React.ReactNode;
19
19
  allowClear?: boolean;
20
20
  max?: Date;
21
21
  min?: Date;
@@ -23,6 +23,7 @@ export declare type CascaderProps = {
23
23
  cancelText?: ReactNode;
24
24
  children?: (items: (CascaderOption | null)[], actions: CascaderActions) => ReactNode;
25
25
  onTabsChange?: (index: number) => void;
26
+ activeIcon?: ReactNode;
26
27
  } & Pick<PopupProps, 'getContainer' | 'afterShow' | 'afterClose' | 'onClick' | 'stopPropagation' | 'destroyOnClose' | 'forceRender'> & NativeProps;
27
28
  export declare const Cascader: React.ForwardRefExoticComponent<{
28
29
  options: CascaderOption[];
@@ -39,6 +40,7 @@ export declare const Cascader: React.ForwardRefExoticComponent<{
39
40
  cancelText?: ReactNode;
40
41
  children?: ((items: (CascaderOption | null)[], actions: CascaderActions) => ReactNode) | undefined;
41
42
  onTabsChange?: ((index: number) => void) | undefined;
43
+ activeIcon?: ReactNode;
42
44
  } & Pick<PopupProps, "onClick" | "destroyOnClose" | "forceRender" | "getContainer" | "afterShow" | "afterClose" | "stopPropagation"> & {
43
45
  className?: string | undefined;
44
46
  style?: (React.CSSProperties & Partial<Record<never, string>>) | undefined;
@@ -18,6 +18,7 @@ declare const _default: import("react").ForwardRefExoticComponent<{
18
18
  cancelText?: import("react").ReactNode;
19
19
  children?: ((items: (import("../cascader-view").CascaderOption | null)[], actions: import("./cascader").CascaderActions) => import("react").ReactNode) | undefined;
20
20
  onTabsChange?: ((index: number) => void) | undefined;
21
+ activeIcon?: import("react").ReactNode;
21
22
  } & Pick<import("../popup").PopupProps, "onClick" | "destroyOnClose" | "forceRender" | "getContainer" | "afterShow" | "afterClose" | "stopPropagation"> & {
22
23
  className?: string | undefined;
23
24
  style?: (import("react").CSSProperties & Partial<Record<never, string>>) | undefined;