antd-mobile 5.17.2 → 5.20.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 -19174
  2. package/2x/bundle/antd-mobile.compatible.umd.js +25815 -0
  3. package/2x/bundle/antd-mobile.es.js +16532 -17127
  4. package/2x/bundle/antd-mobile.umd.js +64 -0
  5. package/2x/bundle/style.css +237 -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 +3 -3
  9. package/2x/cjs/components/calendar/index.d.ts +1 -1
  10. package/2x/cjs/components/cascader/cascader.d.ts +2 -0
  11. package/2x/cjs/components/cascader/index.d.ts +1 -0
  12. package/2x/cjs/components/cascader-view/cascader-view.d.ts +2 -1
  13. package/2x/cjs/components/cascader-view/cascader-view.js +2 -1
  14. package/2x/cjs/components/dialog/show.d.ts +1 -1
  15. package/2x/cjs/components/form/context.d.ts +1 -1
  16. package/2x/cjs/components/form/form-item.js +9 -4
  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/notice-bar/notice-bar.css +9 -0
  22. package/2x/cjs/components/notice-bar/notice-bar.js +5 -3
  23. package/2x/cjs/components/number-keyboard/number-keyboard.css +11 -15
  24. package/2x/cjs/components/number-keyboard/number-keyboard.d.ts +1 -1
  25. package/2x/cjs/components/number-keyboard/number-keyboard.js +19 -17
  26. package/2x/cjs/components/passcode-input/index.d.ts +1 -1
  27. package/2x/cjs/components/passcode-input/passcode-input.css +12 -12
  28. package/2x/cjs/components/passcode-input/passcode-input.js +16 -8
  29. package/2x/cjs/components/rate/rate.css +1 -0
  30. package/2x/cjs/components/rate/rate.js +38 -5
  31. package/2x/cjs/components/rate/star.js +0 -10
  32. package/2x/cjs/components/result/result.d.ts +1 -1
  33. package/2x/cjs/components/result/result.js +7 -1
  34. package/2x/cjs/components/search-bar/search-bar.js +12 -2
  35. package/2x/cjs/components/swipe-action/swipe-action.d.ts +2 -0
  36. package/2x/cjs/components/swipe-action/swipe-action.js +34 -6
  37. package/2x/cjs/components/swiper/swiper.js +14 -0
  38. package/2x/cjs/components/switch/switch.d.ts +2 -1
  39. package/2x/cjs/components/switch/switch.js +16 -3
  40. package/2x/cjs/locales/base.d.ts +9 -0
  41. package/2x/cjs/locales/base.js +9 -0
  42. package/2x/cjs/locales/en-US.d.ts +9 -0
  43. package/2x/cjs/locales/es-ES.d.ts +9 -0
  44. package/2x/cjs/locales/fa-IR.d.ts +9 -0
  45. package/2x/cjs/locales/fr-FR.d.ts +9 -0
  46. package/2x/cjs/locales/id-ID.d.ts +9 -0
  47. package/2x/cjs/locales/id-ID.js +13 -0
  48. package/2x/cjs/locales/kk-KZ.d.ts +9 -0
  49. package/2x/cjs/locales/ko-KR.d.ts +9 -0
  50. package/2x/cjs/locales/zh-CN.d.ts +9 -0
  51. package/2x/cjs/locales/zh-CN.js +9 -0
  52. package/2x/cjs/locales/zh-HK.d.ts +9 -0
  53. package/2x/cjs/locales/zh-TW.d.ts +9 -0
  54. package/2x/cjs/utils/matrix.d.ts +10 -0
  55. package/2x/cjs/utils/matrix.js +60 -0
  56. package/2x/cjs/utils/merge-locale.d.ts +1 -1
  57. package/2x/cjs/utils/merge-locale.js +15 -5
  58. package/2x/cjs/utils/use-drag-and-pinch.d.ts +1 -1
  59. package/2x/cjs/utils/use-props-value.js +1 -1
  60. package/2x/cjs/utils/use-resize-effect.js +3 -1
  61. package/2x/cjs/utils/with-default-props.js +2 -6
  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 +3 -3
  65. package/2x/es/components/calendar/index.d.ts +1 -1
  66. package/2x/es/components/cascader/cascader.d.ts +2 -0
  67. package/2x/es/components/cascader/index.d.ts +1 -0
  68. package/2x/es/components/cascader-view/cascader-view.d.ts +2 -1
  69. package/2x/es/components/cascader-view/cascader-view.js +2 -1
  70. package/2x/es/components/dialog/show.d.ts +1 -1
  71. package/2x/es/components/form/context.d.ts +1 -1
  72. package/2x/es/components/form/form-item.js +8 -4
  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/notice-bar/notice-bar.css +9 -0
  78. package/2x/es/components/notice-bar/notice-bar.js +5 -3
  79. package/2x/es/components/number-keyboard/number-keyboard.css +11 -15
  80. package/2x/es/components/number-keyboard/number-keyboard.d.ts +1 -1
  81. package/2x/es/components/number-keyboard/number-keyboard.js +19 -17
  82. package/2x/es/components/passcode-input/index.d.ts +1 -1
  83. package/2x/es/components/passcode-input/passcode-input.css +12 -12
  84. package/2x/es/components/passcode-input/passcode-input.js +15 -8
  85. package/2x/es/components/rate/rate.css +1 -0
  86. package/2x/es/components/rate/rate.js +32 -5
  87. package/2x/es/components/rate/star.js +0 -10
  88. package/2x/es/components/result/result.d.ts +1 -1
  89. package/2x/es/components/result/result.js +6 -1
  90. package/2x/es/components/search-bar/search-bar.js +12 -2
  91. package/2x/es/components/swipe-action/swipe-action.d.ts +2 -0
  92. package/2x/es/components/swipe-action/swipe-action.js +34 -6
  93. package/2x/es/components/swiper/swiper.js +14 -0
  94. package/2x/es/components/switch/switch.d.ts +2 -1
  95. package/2x/es/components/switch/switch.js +15 -3
  96. package/2x/es/locales/base.d.ts +9 -0
  97. package/2x/es/locales/base.js +9 -0
  98. package/2x/es/locales/en-US.d.ts +9 -0
  99. package/2x/es/locales/es-ES.d.ts +9 -0
  100. package/2x/es/locales/fa-IR.d.ts +9 -0
  101. package/2x/es/locales/fr-FR.d.ts +9 -0
  102. package/2x/es/locales/id-ID.d.ts +9 -0
  103. package/2x/es/locales/id-ID.js +13 -0
  104. package/2x/es/locales/kk-KZ.d.ts +9 -0
  105. package/2x/es/locales/ko-KR.d.ts +9 -0
  106. package/2x/es/locales/zh-CN.d.ts +9 -0
  107. package/2x/es/locales/zh-CN.js +9 -0
  108. package/2x/es/locales/zh-HK.d.ts +9 -0
  109. package/2x/es/locales/zh-TW.d.ts +9 -0
  110. package/2x/es/utils/matrix.d.ts +10 -0
  111. package/2x/es/utils/matrix.js +27 -0
  112. package/2x/es/utils/merge-locale.d.ts +1 -1
  113. package/2x/es/utils/merge-locale.js +17 -3
  114. package/2x/es/utils/use-drag-and-pinch.d.ts +1 -1
  115. package/2x/es/utils/use-props-value.js +1 -1
  116. package/2x/es/utils/use-resize-effect.js +3 -1
  117. package/2x/es/utils/with-default-props.js +2 -4
  118. package/2x/package.json +6 -6
  119. package/2x/umd/antd-mobile.js +25815 -2
  120. package/bundle/antd-mobile.cjs.js +47 -19174
  121. package/bundle/antd-mobile.compatible.umd.js +25815 -0
  122. package/bundle/antd-mobile.es.js +16532 -17127
  123. package/bundle/antd-mobile.umd.js +64 -0
  124. package/bundle/style.css +1 -4080
  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 +3 -3
  128. package/cjs/components/calendar/index.d.ts +1 -1
  129. package/cjs/components/cascader/cascader.d.ts +2 -0
  130. package/cjs/components/cascader/index.d.ts +1 -0
  131. package/cjs/components/cascader-view/cascader-view.d.ts +2 -1
  132. package/cjs/components/cascader-view/cascader-view.js +2 -1
  133. package/cjs/components/dialog/show.d.ts +1 -1
  134. package/cjs/components/form/context.d.ts +1 -1
  135. package/cjs/components/form/form-item.js +9 -4
  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/notice-bar/notice-bar.css +8 -0
  141. package/cjs/components/notice-bar/notice-bar.js +5 -3
  142. package/cjs/components/number-keyboard/number-keyboard.css +11 -14
  143. package/cjs/components/number-keyboard/number-keyboard.d.ts +1 -1
  144. package/cjs/components/number-keyboard/number-keyboard.js +19 -17
  145. package/cjs/components/passcode-input/index.d.ts +1 -1
  146. package/cjs/components/passcode-input/passcode-input.css +12 -12
  147. package/cjs/components/passcode-input/passcode-input.js +16 -8
  148. package/cjs/components/rate/rate.css +1 -0
  149. package/cjs/components/rate/rate.js +38 -5
  150. package/cjs/components/rate/star.js +0 -10
  151. package/cjs/components/result/result.d.ts +1 -1
  152. package/cjs/components/result/result.js +7 -1
  153. package/cjs/components/search-bar/search-bar.js +12 -2
  154. package/cjs/components/swipe-action/swipe-action.d.ts +2 -0
  155. package/cjs/components/swipe-action/swipe-action.js +34 -6
  156. package/cjs/components/swiper/swiper.js +14 -0
  157. package/cjs/components/switch/switch.d.ts +2 -1
  158. package/cjs/components/switch/switch.js +16 -3
  159. package/cjs/locales/base.d.ts +9 -0
  160. package/cjs/locales/base.js +9 -0
  161. package/cjs/locales/en-US.d.ts +9 -0
  162. package/cjs/locales/es-ES.d.ts +9 -0
  163. package/cjs/locales/fa-IR.d.ts +9 -0
  164. package/cjs/locales/fr-FR.d.ts +9 -0
  165. package/cjs/locales/id-ID.d.ts +9 -0
  166. package/cjs/locales/id-ID.js +13 -0
  167. package/cjs/locales/kk-KZ.d.ts +9 -0
  168. package/cjs/locales/ko-KR.d.ts +9 -0
  169. package/cjs/locales/zh-CN.d.ts +9 -0
  170. package/cjs/locales/zh-CN.js +9 -0
  171. package/cjs/locales/zh-HK.d.ts +9 -0
  172. package/cjs/locales/zh-TW.d.ts +9 -0
  173. package/cjs/utils/matrix.d.ts +10 -0
  174. package/cjs/utils/matrix.js +60 -0
  175. package/cjs/utils/merge-locale.d.ts +1 -1
  176. package/cjs/utils/merge-locale.js +15 -5
  177. package/cjs/utils/use-drag-and-pinch.d.ts +1 -1
  178. package/cjs/utils/use-props-value.js +1 -1
  179. package/cjs/utils/use-resize-effect.js +3 -1
  180. package/cjs/utils/with-default-props.js +2 -6
  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 +3 -3
  184. package/es/components/calendar/index.d.ts +1 -1
  185. package/es/components/cascader/cascader.d.ts +2 -0
  186. package/es/components/cascader/index.d.ts +1 -0
  187. package/es/components/cascader-view/cascader-view.d.ts +2 -1
  188. package/es/components/cascader-view/cascader-view.js +2 -1
  189. package/es/components/dialog/show.d.ts +1 -1
  190. package/es/components/form/context.d.ts +1 -1
  191. package/es/components/form/form-item.js +8 -4
  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/notice-bar/notice-bar.css +8 -0
  197. package/es/components/notice-bar/notice-bar.js +5 -3
  198. package/es/components/number-keyboard/number-keyboard.css +11 -14
  199. package/es/components/number-keyboard/number-keyboard.d.ts +1 -1
  200. package/es/components/number-keyboard/number-keyboard.js +19 -17
  201. package/es/components/passcode-input/index.d.ts +1 -1
  202. package/es/components/passcode-input/passcode-input.css +12 -12
  203. package/es/components/passcode-input/passcode-input.js +15 -8
  204. package/es/components/rate/rate.css +1 -0
  205. package/es/components/rate/rate.js +32 -5
  206. package/es/components/rate/star.js +0 -10
  207. package/es/components/result/result.d.ts +1 -1
  208. package/es/components/result/result.js +6 -1
  209. package/es/components/search-bar/search-bar.js +12 -2
  210. package/es/components/swipe-action/swipe-action.d.ts +2 -0
  211. package/es/components/swipe-action/swipe-action.js +34 -6
  212. package/es/components/swiper/swiper.js +14 -0
  213. package/es/components/switch/switch.d.ts +2 -1
  214. package/es/components/switch/switch.js +15 -3
  215. package/es/locales/base.d.ts +9 -0
  216. package/es/locales/base.js +9 -0
  217. package/es/locales/en-US.d.ts +9 -0
  218. package/es/locales/es-ES.d.ts +9 -0
  219. package/es/locales/fa-IR.d.ts +9 -0
  220. package/es/locales/fr-FR.d.ts +9 -0
  221. package/es/locales/id-ID.d.ts +9 -0
  222. package/es/locales/id-ID.js +13 -0
  223. package/es/locales/kk-KZ.d.ts +9 -0
  224. package/es/locales/ko-KR.d.ts +9 -0
  225. package/es/locales/zh-CN.d.ts +9 -0
  226. package/es/locales/zh-CN.js +9 -0
  227. package/es/locales/zh-HK.d.ts +9 -0
  228. package/es/locales/zh-TW.d.ts +9 -0
  229. package/es/utils/matrix.d.ts +10 -0
  230. package/es/utils/matrix.js +27 -0
  231. package/es/utils/merge-locale.d.ts +1 -1
  232. package/es/utils/merge-locale.js +17 -3
  233. package/es/utils/use-drag-and-pinch.d.ts +1 -1
  234. package/es/utils/use-props-value.js +1 -1
  235. package/es/utils/use-resize-effect.js +3 -1
  236. package/es/utils/with-default-props.js +2 -4
  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
@@ -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;
@@ -1 +1 @@
1
- export declare function mergeLocale<T, P>(base: T, patch: P): T;
1
+ export declare function mergeLocale<T extends object, P extends object>(base: T, patch: P): T;
@@ -5,12 +5,22 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.mergeLocale = mergeLocale;
7
7
 
8
- var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
8
+ function mergeLocale(base, patch) {
9
+ function merge(a, b) {
10
+ if (typeof a !== 'object' || typeof b !== 'object' || Array.isArray(a) || Array.isArray(b)) {
11
+ return b !== undefined ? b : a;
12
+ }
9
13
 
10
- var _merge = _interopRequireDefault(require("lodash/merge"));
14
+ const result = {};
11
15
 
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+ for (const key in a) {
17
+ if (a.hasOwnProperty(key)) {
18
+ result[key] = merge(a[key], b[key]);
19
+ }
20
+ }
13
21
 
14
- function mergeLocale(base, patch) {
15
- return (0, _merge.default)((0, _cloneDeep.default)(base), patch);
22
+ return result;
23
+ }
24
+
25
+ return merge(base, patch);
16
26
  }
@@ -1 +1 @@
1
- export declare const useDragAndPinch: <Config extends import("@use-gesture/react").UserGestureConfig = import("@use-gesture/react").UserGestureConfig>(_handlers: Partial<import("@use-gesture/react").NativeHandlers<import("@use-gesture/react").EventTypes> & import("@use-gesture/react").UserHandlers<import("@use-gesture/react").EventTypes>>, _config?: Config | undefined) => Config["target"] extends object ? void : (...args: any[]) => import("@use-gesture/react").ReactDOMAttributes;
1
+ export declare const useDragAndPinch: <Config extends import("@use-gesture/react").UserGestureConfig = import("@use-gesture/react").UserGestureConfig>(_handlers: Partial<import("@use-gesture/react").NativeHandlers<import("@use-gesture/react").EventTypes> & import("@use-gesture/react").UserHandlers<import("@use-gesture/react").EventTypes>>, _config?: Config | undefined) => Config["target"] extends object ? void : (...args: any[]) => import("@use-gesture/react/dist/declarations/src/types").ReactDOMAttributes;
@@ -28,7 +28,7 @@ function usePropsValue(options) {
28
28
  if (!forceTrigger && nextValue === stateRef.current) return;
29
29
  stateRef.current = nextValue;
30
30
  update();
31
- onChange === null || onChange === void 0 ? void 0 : onChange(nextValue);
31
+ return onChange === null || onChange === void 0 ? void 0 : onChange(nextValue);
32
32
  });
33
33
  return [stateRef.current, setState];
34
34
  }
@@ -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 {
@@ -5,20 +5,16 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.mergeProps = mergeProps;
7
7
 
8
- var _assign = _interopRequireDefault(require("lodash/assign"));
9
-
10
8
  var _assignWith = _interopRequireDefault(require("lodash/assignWith"));
11
9
 
12
- var _isUndefined = _interopRequireDefault(require("lodash/isUndefined"));
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
11
 
16
12
  function mergeProps(...items) {
17
13
  function customizer(objValue, srcValue) {
18
- return (0, _isUndefined.default)(srcValue) ? objValue : srcValue;
14
+ return srcValue === undefined ? objValue : srcValue;
19
15
  }
20
16
 
21
- let ret = (0, _assign.default)({}, items[0]);
17
+ let ret = Object.assign({}, items[0]);
22
18
 
23
19
  for (let i = 1; i < items.length; i++) {
24
20
  ret = (0, _assignWith.default)(ret, items[i], customizer);
@@ -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
  });
@@ -4,7 +4,7 @@ declare type Page = {
4
4
  month: number;
5
5
  year: number;
6
6
  };
7
- export declare type CalenderRef = {
7
+ export declare type CalendarRef = {
8
8
  jumpTo: (page: Page | ((page: Page) => Page)) => void;
9
9
  jumpToToday: () => void;
10
10
  };
@@ -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;
@@ -36,5 +36,5 @@ export declare type CalendarProps = {
36
36
  defaultValue?: [Date, Date] | null;
37
37
  onChange?: (val: [Date, Date] | null) => void;
38
38
  }) & NativeProps;
39
- export declare const Calendar: React.ForwardRefExoticComponent<CalendarProps & React.RefAttributes<CalenderRef>>;
39
+ export declare const Calendar: React.ForwardRefExoticComponent<CalendarProps & React.RefAttributes<CalendarRef>>;
40
40
  export {};
@@ -1,4 +1,4 @@
1
1
  import './calendar.less';
2
2
  import { Calendar } from './calendar';
3
- export type { CalendarProps, CalenderRef } from './calendar';
3
+ export type { CalendarProps, CalendarRef } from './calendar';
4
4
  export default Calendar;
@@ -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;
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  import { NativeProps } from '../../utils/native-props';
3
3
  export declare type CascaderValue = string;
4
4
  export declare type CascaderOption = {
@@ -18,5 +18,6 @@ export declare type CascaderViewProps = {
18
18
  onChange?: (value: CascaderValue[], extend: CascaderValueExtend) => void;
19
19
  placeholder?: string;
20
20
  onTabsChange?: (index: number) => void;
21
+ activeIcon?: ReactNode;
21
22
  } & NativeProps<'--height'>;
22
23
  export declare const CascaderView: FC<CascaderViewProps>;
@@ -121,7 +121,8 @@ export const CascaderView = p => {
121
121
  animated: true
122
122
  })) : React.createElement(CheckList, {
123
123
  value: [value[index]],
124
- onChange: selectValue => onItemSelect(selectValue[0], index)
124
+ onChange: selectValue => onItemSelect(selectValue[0], index),
125
+ activeIcon: props.activeIcon
125
126
  }, level.options.map(option => {
126
127
  const active = value[index] === option.value;
127
128
  return React.createElement(CheckList.Item, {
@@ -1,5 +1,5 @@
1
1
  import { DialogProps } from './dialog';
2
- export declare type DialogShowProps = Omit<DialogProps, 'visible'>;
2
+ export declare type DialogShowProps = Omit<DialogProps, 'visible' | 'destroyOnClose' | 'forceRender'>;
3
3
  export declare type DialogShowHandler = {
4
4
  close: () => void;
5
5
  };
@@ -5,7 +5,7 @@ export declare type FormContextType = {
5
5
  name?: string;
6
6
  hasFeedback: boolean;
7
7
  layout: FormLayout;
8
- requiredMarkStyle: 'asterisk' | 'text-required' | 'text-optional';
8
+ requiredMarkStyle: 'asterisk' | 'text-required' | 'text-optional' | 'none';
9
9
  disabled: boolean;
10
10
  };
11
11
  export declare const defaultFormContext: FormContextType;
@@ -1,6 +1,7 @@
1
1
  import { __rest } from "tslib";
2
2
  import React, { useContext, useCallback, useState, useRef } from 'react';
3
3
  import classNames from 'classnames';
4
+ import { withNativeProps } from '../../utils/native-props';
4
5
  import { Field } from 'rc-field-form';
5
6
  import FieldContext from 'rc-field-form/lib/FieldContext';
6
7
  import { devWarning } from '../../utils/dev-log';
@@ -62,6 +63,9 @@ const FormItemLayout = props => {
62
63
  className: `${classPrefix}-required-text`
63
64
  }, "(", locale.Form.optional, ")");
64
65
 
66
+ case 'none':
67
+ return null;
68
+
65
69
  default:
66
70
  return null;
67
71
  }
@@ -87,7 +91,7 @@ const FormItemLayout = props => {
87
91
  key: `warning-${index}`,
88
92
  className: `${classPrefix}-feedback-warning`
89
93
  }, warning)))) : null;
90
- return React.createElement(List.Item, {
94
+ return withNativeProps(props, React.createElement(List.Item, {
91
95
  style: style,
92
96
  title: layout === 'vertical' && labelElement,
93
97
  prefix: layout === 'horizontal' && labelElement,
@@ -105,7 +109,7 @@ const FormItemLayout = props => {
105
109
  className: classNames(`${classPrefix}-child`, `${classPrefix}-child-position-${childElementPosition}`)
106
110
  }, React.createElement("div", {
107
111
  className: classNames(`${classPrefix}-child-inner`)
108
- }, children)));
112
+ }, children))));
109
113
  };
110
114
 
111
115
  export const FormItem = props => {
@@ -197,7 +201,7 @@ export const FormItem = props => {
197
201
 
198
202
  return subWarnings;
199
203
  }, curWarnings);
200
- return React.createElement(FormItemLayout, {
204
+ return withNativeProps(props, React.createElement(FormItemLayout, {
201
205
  className: className,
202
206
  style: style,
203
207
  label: label,
@@ -218,7 +222,7 @@ export const FormItem = props => {
218
222
  arrow: arrow
219
223
  }, React.createElement(NoStyleItemContext.Provider, {
220
224
  value: onSubMetaChange
221
- }, baseChildren));
225
+ }, baseChildren)));
222
226
  }
223
227
 
224
228
  const isRenderProps = typeof children === 'function';