@arco-design/mobile-react 2.20.0 → 2.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 (295) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.en-US.md +2 -2
  3. package/README.md +2 -2
  4. package/cjs/avatar/index.d.ts +1 -1
  5. package/cjs/avatar/index.js +1 -1
  6. package/cjs/badge/index.d.ts +1 -1
  7. package/cjs/badge/index.js +1 -1
  8. package/cjs/carousel/index.d.ts +1 -1
  9. package/cjs/carousel/index.js +1 -1
  10. package/cjs/cell/index.d.ts +1 -1
  11. package/cjs/cell/index.js +1 -1
  12. package/cjs/checkbox/index.d.ts +1 -1
  13. package/cjs/checkbox/index.js +1 -1
  14. package/cjs/collapse/index.d.ts +1 -1
  15. package/cjs/collapse/index.js +1 -1
  16. package/cjs/count-down/index.d.ts +1 -1
  17. package/cjs/count-down/index.js +1 -1
  18. package/cjs/date-picker/index.d.ts +1 -1
  19. package/cjs/date-picker/index.js +1 -1
  20. package/cjs/dropdown/dropdown.js +36 -20
  21. package/cjs/dropdown/style/css/index.css +3 -0
  22. package/cjs/dropdown/style/index.less +2 -0
  23. package/cjs/ellipsis/index.d.ts +1 -1
  24. package/cjs/ellipsis/index.js +1 -1
  25. package/cjs/image/index.d.ts +1 -1
  26. package/cjs/image/index.js +1 -1
  27. package/cjs/image-picker/index.d.ts +4 -175
  28. package/cjs/image-picker/index.js +41 -18
  29. package/cjs/image-picker/type.d.ts +174 -0
  30. package/cjs/image-picker/type.js +3 -0
  31. package/cjs/image-preview/index.d.ts +1 -1
  32. package/cjs/image-preview/index.js +1 -1
  33. package/cjs/index.d.ts +2 -0
  34. package/cjs/index.js +9 -1
  35. package/cjs/input/hooks.js +49 -8
  36. package/cjs/input/index.d.ts +1 -1
  37. package/cjs/input/index.js +1 -1
  38. package/cjs/input/props.d.ts +8 -2
  39. package/cjs/notice-bar/index.d.ts +1 -1
  40. package/cjs/notice-bar/index.js +1 -1
  41. package/cjs/picker/index.d.ts +1 -1
  42. package/cjs/picker/index.js +1 -1
  43. package/cjs/picker-view/index.d.ts +1 -1
  44. package/cjs/picker-view/index.js +1 -1
  45. package/cjs/popover/index.d.ts +1 -1
  46. package/cjs/popover/index.js +1 -1
  47. package/cjs/popup-swiper/index.js +3 -2
  48. package/cjs/radio/index.d.ts +1 -1
  49. package/cjs/radio/index.js +1 -1
  50. package/cjs/rate/index.d.ts +1 -1
  51. package/cjs/rate/index.js +1 -1
  52. package/cjs/search-bar/association.d.ts +3 -0
  53. package/cjs/search-bar/association.js +92 -0
  54. package/cjs/search-bar/cancel-button.d.ts +10 -0
  55. package/cjs/search-bar/cancel-button.js +41 -0
  56. package/cjs/search-bar/demo/style/css/mobile.css +5 -0
  57. package/cjs/search-bar/demo/style/mobile.less +9 -0
  58. package/cjs/search-bar/highlight.d.ts +12 -0
  59. package/cjs/search-bar/highlight.js +77 -0
  60. package/cjs/search-bar/index.d.ts +13 -0
  61. package/cjs/search-bar/index.js +239 -0
  62. package/cjs/search-bar/style/css/index.css +148 -0
  63. package/cjs/search-bar/style/css/index.d.ts +2 -0
  64. package/cjs/search-bar/style/css/index.js +5 -0
  65. package/cjs/search-bar/style/index.d.ts +2 -0
  66. package/cjs/search-bar/style/index.js +5 -0
  67. package/cjs/search-bar/style/index.less +111 -0
  68. package/cjs/search-bar/type.d.ts +163 -0
  69. package/cjs/search-bar/type.js +3 -0
  70. package/cjs/slider/index.d.ts +1 -1
  71. package/cjs/slider/index.js +1 -1
  72. package/cjs/steps/index.d.ts +1 -1
  73. package/cjs/steps/index.js +1 -1
  74. package/cjs/sticky/index.d.ts +1 -1
  75. package/cjs/style.d.ts +2 -0
  76. package/cjs/style.js +4 -0
  77. package/cjs/swipe-action/demo/style/css/mobile.css +5 -0
  78. package/cjs/swipe-action/demo/style/mobile.less +9 -0
  79. package/cjs/swipe-action/index.d.ts +12 -0
  80. package/cjs/swipe-action/index.js +339 -0
  81. package/cjs/swipe-action/item.d.ts +11 -0
  82. package/cjs/swipe-action/item.js +52 -0
  83. package/cjs/swipe-action/style/css/index.css +88 -0
  84. package/cjs/swipe-action/style/css/index.d.ts +2 -0
  85. package/cjs/swipe-action/style/css/index.js +5 -0
  86. package/cjs/swipe-action/style/index.d.ts +2 -0
  87. package/cjs/swipe-action/style/index.js +5 -0
  88. package/cjs/swipe-action/style/index.less +89 -0
  89. package/cjs/swipe-action/type.d.ts +123 -0
  90. package/cjs/swipe-action/type.js +3 -0
  91. package/cjs/switch/index.d.ts +1 -1
  92. package/cjs/switch/index.js +1 -1
  93. package/cjs/tabs/tab-pane.js +5 -1
  94. package/cjs/tag/index.d.ts +1 -1
  95. package/cjs/tag/index.js +1 -1
  96. package/cjs/textarea/index.d.ts +1 -1
  97. package/cjs/textarea/index.js +1 -1
  98. package/dist/index.js +7450 -6611
  99. package/dist/index.min.js +6 -6
  100. package/dist/style.css +203 -0
  101. package/dist/style.min.css +1 -1
  102. package/esm/avatar/index.d.ts +1 -1
  103. package/esm/avatar/index.js +1 -1
  104. package/esm/badge/index.d.ts +1 -1
  105. package/esm/badge/index.js +1 -1
  106. package/esm/carousel/index.d.ts +1 -1
  107. package/esm/carousel/index.js +1 -1
  108. package/esm/cell/index.d.ts +1 -1
  109. package/esm/cell/index.js +1 -1
  110. package/esm/checkbox/index.d.ts +1 -1
  111. package/esm/checkbox/index.js +1 -1
  112. package/esm/collapse/index.d.ts +1 -1
  113. package/esm/collapse/index.js +1 -1
  114. package/esm/count-down/index.d.ts +1 -1
  115. package/esm/count-down/index.js +1 -1
  116. package/esm/date-picker/index.d.ts +1 -1
  117. package/esm/date-picker/index.js +1 -1
  118. package/esm/dropdown/dropdown.js +36 -20
  119. package/esm/dropdown/style/css/index.css +3 -0
  120. package/esm/dropdown/style/index.less +2 -0
  121. package/esm/ellipsis/index.d.ts +1 -1
  122. package/esm/ellipsis/index.js +1 -1
  123. package/esm/image/index.d.ts +1 -1
  124. package/esm/image/index.js +1 -1
  125. package/esm/image-picker/index.d.ts +4 -175
  126. package/esm/image-picker/index.js +30 -17
  127. package/esm/image-picker/type.d.ts +174 -0
  128. package/esm/image-picker/type.js +1 -0
  129. package/esm/image-preview/index.d.ts +1 -1
  130. package/esm/image-preview/index.js +1 -1
  131. package/esm/index.d.ts +2 -0
  132. package/esm/index.js +2 -0
  133. package/esm/input/hooks.js +49 -8
  134. package/esm/input/index.d.ts +1 -1
  135. package/esm/input/index.js +1 -1
  136. package/esm/input/props.d.ts +8 -2
  137. package/esm/notice-bar/index.d.ts +1 -1
  138. package/esm/notice-bar/index.js +1 -1
  139. package/esm/picker/index.d.ts +1 -1
  140. package/esm/picker/index.js +1 -1
  141. package/esm/picker-view/index.d.ts +1 -1
  142. package/esm/picker-view/index.js +1 -1
  143. package/esm/popover/index.d.ts +1 -1
  144. package/esm/popover/index.js +1 -1
  145. package/esm/popup-swiper/index.js +3 -2
  146. package/esm/radio/index.d.ts +1 -1
  147. package/esm/radio/index.js +1 -1
  148. package/esm/rate/index.d.ts +1 -1
  149. package/esm/rate/index.js +1 -1
  150. package/esm/search-bar/association.d.ts +3 -0
  151. package/esm/search-bar/association.js +82 -0
  152. package/esm/search-bar/cancel-button.d.ts +10 -0
  153. package/esm/search-bar/cancel-button.js +30 -0
  154. package/esm/search-bar/demo/style/css/mobile.css +5 -0
  155. package/esm/search-bar/demo/style/mobile.less +9 -0
  156. package/esm/search-bar/highlight.d.ts +12 -0
  157. package/esm/search-bar/highlight.js +66 -0
  158. package/esm/search-bar/index.d.ts +13 -0
  159. package/esm/search-bar/index.js +213 -0
  160. package/esm/search-bar/style/css/index.css +148 -0
  161. package/esm/search-bar/style/css/index.d.ts +2 -0
  162. package/esm/search-bar/style/css/index.js +2 -0
  163. package/esm/search-bar/style/index.d.ts +2 -0
  164. package/esm/search-bar/style/index.js +2 -0
  165. package/esm/search-bar/style/index.less +111 -0
  166. package/esm/search-bar/type.d.ts +163 -0
  167. package/esm/search-bar/type.js +1 -0
  168. package/esm/slider/index.d.ts +1 -1
  169. package/esm/slider/index.js +1 -1
  170. package/esm/steps/index.d.ts +1 -1
  171. package/esm/steps/index.js +1 -1
  172. package/esm/sticky/index.d.ts +1 -1
  173. package/esm/style.d.ts +2 -0
  174. package/esm/style.js +2 -0
  175. package/esm/swipe-action/demo/style/css/mobile.css +5 -0
  176. package/esm/swipe-action/demo/style/mobile.less +9 -0
  177. package/esm/swipe-action/index.d.ts +12 -0
  178. package/esm/swipe-action/index.js +321 -0
  179. package/esm/swipe-action/item.d.ts +11 -0
  180. package/esm/swipe-action/item.js +42 -0
  181. package/esm/swipe-action/style/css/index.css +88 -0
  182. package/esm/swipe-action/style/css/index.d.ts +2 -0
  183. package/esm/swipe-action/style/css/index.js +2 -0
  184. package/esm/swipe-action/style/index.d.ts +2 -0
  185. package/esm/swipe-action/style/index.js +2 -0
  186. package/esm/swipe-action/style/index.less +89 -0
  187. package/esm/swipe-action/type.d.ts +123 -0
  188. package/esm/swipe-action/type.js +1 -0
  189. package/esm/switch/index.d.ts +1 -1
  190. package/esm/switch/index.js +1 -1
  191. package/esm/tabs/tab-pane.js +5 -1
  192. package/esm/tag/index.d.ts +1 -1
  193. package/esm/tag/index.js +1 -1
  194. package/esm/textarea/index.d.ts +1 -1
  195. package/esm/textarea/index.js +1 -1
  196. package/package.json +3 -3
  197. package/tokens/app/arcodesign/default/css-variables.less +34 -0
  198. package/tokens/app/arcodesign/default/index.d.ts +34 -0
  199. package/tokens/app/arcodesign/default/index.js +34 -0
  200. package/tokens/app/arcodesign/default/index.json +398 -0
  201. package/tokens/app/arcodesign/default/index.less +34 -0
  202. package/umd/avatar/index.d.ts +1 -1
  203. package/umd/avatar/index.js +1 -1
  204. package/umd/badge/index.d.ts +1 -1
  205. package/umd/badge/index.js +1 -1
  206. package/umd/carousel/index.d.ts +1 -1
  207. package/umd/carousel/index.js +1 -1
  208. package/umd/cell/index.d.ts +1 -1
  209. package/umd/cell/index.js +1 -1
  210. package/umd/checkbox/index.d.ts +1 -1
  211. package/umd/checkbox/index.js +1 -1
  212. package/umd/collapse/index.d.ts +1 -1
  213. package/umd/collapse/index.js +1 -1
  214. package/umd/count-down/index.d.ts +1 -1
  215. package/umd/count-down/index.js +1 -1
  216. package/umd/date-picker/index.d.ts +1 -1
  217. package/umd/date-picker/index.js +1 -1
  218. package/umd/dropdown/dropdown.js +36 -20
  219. package/umd/dropdown/style/css/index.css +3 -0
  220. package/umd/dropdown/style/index.less +2 -0
  221. package/umd/ellipsis/index.d.ts +1 -1
  222. package/umd/ellipsis/index.js +1 -1
  223. package/umd/image/index.d.ts +1 -1
  224. package/umd/image/index.js +1 -1
  225. package/umd/image-picker/index.d.ts +4 -175
  226. package/umd/image-picker/index.js +40 -22
  227. package/umd/image-picker/type.d.ts +174 -0
  228. package/umd/image-picker/type.js +17 -0
  229. package/umd/image-preview/index.d.ts +1 -1
  230. package/umd/image-preview/index.js +1 -1
  231. package/umd/index.d.ts +2 -0
  232. package/umd/index.js +9 -5
  233. package/umd/input/hooks.js +48 -7
  234. package/umd/input/index.d.ts +1 -1
  235. package/umd/input/index.js +1 -1
  236. package/umd/input/props.d.ts +8 -2
  237. package/umd/notice-bar/index.d.ts +1 -1
  238. package/umd/notice-bar/index.js +1 -1
  239. package/umd/picker/index.d.ts +1 -1
  240. package/umd/picker/index.js +1 -1
  241. package/umd/picker-view/index.d.ts +1 -1
  242. package/umd/picker-view/index.js +1 -1
  243. package/umd/popover/index.d.ts +1 -1
  244. package/umd/popover/index.js +1 -1
  245. package/umd/popup-swiper/index.js +3 -2
  246. package/umd/radio/index.d.ts +1 -1
  247. package/umd/radio/index.js +1 -1
  248. package/umd/rate/index.d.ts +1 -1
  249. package/umd/rate/index.js +1 -1
  250. package/umd/search-bar/association.d.ts +3 -0
  251. package/umd/search-bar/association.js +101 -0
  252. package/umd/search-bar/cancel-button.d.ts +10 -0
  253. package/umd/search-bar/cancel-button.js +52 -0
  254. package/umd/search-bar/demo/style/css/mobile.css +5 -0
  255. package/umd/search-bar/demo/style/mobile.less +9 -0
  256. package/umd/search-bar/highlight.d.ts +12 -0
  257. package/umd/search-bar/highlight.js +87 -0
  258. package/umd/search-bar/index.d.ts +13 -0
  259. package/umd/search-bar/index.js +235 -0
  260. package/umd/search-bar/style/css/index.css +148 -0
  261. package/umd/search-bar/style/css/index.d.ts +2 -0
  262. package/umd/search-bar/style/css/index.js +15 -0
  263. package/umd/search-bar/style/index.d.ts +2 -0
  264. package/umd/search-bar/style/index.js +15 -0
  265. package/umd/search-bar/style/index.less +111 -0
  266. package/umd/search-bar/type.d.ts +163 -0
  267. package/umd/search-bar/type.js +17 -0
  268. package/umd/slider/index.d.ts +1 -1
  269. package/umd/slider/index.js +1 -1
  270. package/umd/steps/index.d.ts +1 -1
  271. package/umd/steps/index.js +1 -1
  272. package/umd/sticky/index.d.ts +1 -1
  273. package/umd/style.d.ts +2 -0
  274. package/umd/style.js +4 -4
  275. package/umd/swipe-action/demo/style/css/mobile.css +5 -0
  276. package/umd/swipe-action/demo/style/mobile.less +9 -0
  277. package/umd/swipe-action/index.d.ts +12 -0
  278. package/umd/swipe-action/index.js +342 -0
  279. package/umd/swipe-action/item.d.ts +11 -0
  280. package/umd/swipe-action/item.js +62 -0
  281. package/umd/swipe-action/style/css/index.css +88 -0
  282. package/umd/swipe-action/style/css/index.d.ts +2 -0
  283. package/umd/swipe-action/style/css/index.js +15 -0
  284. package/umd/swipe-action/style/index.d.ts +2 -0
  285. package/umd/swipe-action/style/index.js +15 -0
  286. package/umd/swipe-action/style/index.less +89 -0
  287. package/umd/swipe-action/type.d.ts +123 -0
  288. package/umd/swipe-action/type.js +17 -0
  289. package/umd/switch/index.d.ts +1 -1
  290. package/umd/switch/index.js +1 -1
  291. package/umd/tabs/tab-pane.js +5 -1
  292. package/umd/tag/index.d.ts +1 -1
  293. package/umd/tag/index.js +1 -1
  294. package/umd/textarea/index.d.ts +1 -1
  295. package/umd/textarea/index.js +1 -1
@@ -3,12 +3,15 @@
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
5
  exports.__esModule = true;
6
+ var _exportNames = {};
6
7
  exports.default = void 0;
7
8
 
8
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
10
 
10
11
  var _react = _interopRequireWildcard(require("react"));
11
12
 
13
+ var _es6Promise = require("es6-promise");
14
+
12
15
  var _mobileUtils = require("@arco-design/mobile-utils");
13
16
 
14
17
  var _contextProvider = require("../context-provider");
@@ -21,6 +24,15 @@ var _grid = _interopRequireDefault(require("../grid"));
21
24
 
22
25
  var _addIcon = _interopRequireDefault(require("./add-icon"));
23
26
 
27
+ var _type = require("./type");
28
+
29
+ Object.keys(_type).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
32
+ if (key in exports && exports[key] === _type[key]) return;
33
+ exports[key] = _type[key];
34
+ });
35
+
24
36
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
37
 
26
38
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -28,7 +40,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
28
40
  /**
29
41
  * 图片选择器组件
30
42
  * @en ImagePicker Component
31
- * @type 数据输入
43
+ * @type 数据录入
32
44
  * @type_en Data Entry
33
45
  * @name 图片选择器
34
46
  * @name_en ImagePicker
@@ -75,6 +87,7 @@ var ImagePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
75
87
  selectAdapter = props.selectAdapter;
76
88
  var domRef = (0, _react.useRef)(null);
77
89
  var fileRef = (0, _react.useRef)(null);
90
+ var cacheRef = (0, _react.useRef)([]);
78
91
  (0, _react.useImperativeHandle)(ref, function () {
79
92
  return {
80
93
  dom: domRef.current
@@ -82,7 +95,7 @@ var ImagePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
82
95
  });
83
96
 
84
97
  var parseFile = function parseFile(file) {
85
- return new Promise(function (resolve, reject) {
98
+ return new _es6Promise.Promise(function (resolve, reject) {
86
99
  if (file.url) {
87
100
  resolve(file.url);
88
101
  } else {
@@ -110,7 +123,7 @@ var ImagePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
110
123
  };
111
124
 
112
125
  var handleChange = function handleChange(event, fromAdapter) {
113
- var files = [].concat(event.target.files || []).filter(function (file) {
126
+ var files = Array.prototype.filter.call(event.target.files || [], function (file) {
114
127
  // 过滤maxSize
115
128
  if (maxSize && file.size > maxSize * 1024) {
116
129
  onMaxSizeExceed && onMaxSizeExceed(file);
@@ -131,7 +144,7 @@ var ImagePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
131
144
  } // 解析文件生成预览
132
145
 
133
146
 
134
- Promise.all(files.map(function (file) {
147
+ _es6Promise.Promise.all(files.map(function (file) {
135
148
  return parseFile(file);
136
149
  })).then(function (parseFiles) {
137
150
  var res = parseFiles.map(function (url, index) {
@@ -141,20 +154,30 @@ var ImagePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
141
154
  file: files[index]
142
155
  };
143
156
  });
144
- var cacheRes = [].concat(images, res);
145
- onChange(cacheRes); // 执行upload
157
+ cacheRef.current = [].concat(images, res);
158
+ onChange([].concat(cacheRef.current)); // 执行upload
146
159
 
147
160
  if (typeof upload === 'function') {
148
- var propsImageLength = images.length;
149
- files.forEach(function (_file, index) {
150
- upload(cacheRes[propsImageLength + index]).then(function (data) {
151
- cacheRes[propsImageLength + index] = (0, _extends2.default)({}, cacheRes[propsImageLength + index], data, {
161
+ files.forEach(function (_file) {
162
+ upload(cacheRef.current.find(function (_ref) {
163
+ var file = _ref.file;
164
+ return file === _file;
165
+ })).then(function (data) {
166
+ var index = cacheRef.current.findIndex(function (_ref2) {
167
+ var file = _ref2.file;
168
+ return file === _file;
169
+ });
170
+ cacheRef.current[index] = (0, _extends2.default)({}, cacheRef.current[index], data, {
152
171
  status: undefined
153
172
  });
154
173
  }).catch(function () {
155
- cacheRes[propsImageLength + index].status = 'error';
174
+ var index = cacheRef.current.findIndex(function (_ref3) {
175
+ var file = _ref3.file;
176
+ return file === _file;
177
+ });
178
+ cacheRef.current[index].status = 'error';
156
179
  }).finally(function () {
157
- onChange([].concat(cacheRes));
180
+ onChange([].concat(cacheRef.current));
158
181
  });
159
182
  });
160
183
  }
@@ -189,8 +212,8 @@ var ImagePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
189
212
  var handleSelect = function handleSelect() {
190
213
  var _fileRef$current;
191
214
 
192
- selectAdapter ? selectAdapter().then(function (_ref) {
193
- var files = _ref.files;
215
+ selectAdapter ? selectAdapter().then(function (_ref4) {
216
+ var files = _ref4.files;
194
217
  return handleChange({
195
218
  target: {
196
219
  files: files
@@ -285,12 +308,12 @@ var ImagePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
285
308
  return data;
286
309
  };
287
310
 
288
- return /*#__PURE__*/_react.default.createElement(_contextProvider.ContextLayout, null, function (_ref2) {
311
+ return /*#__PURE__*/_react.default.createElement(_contextProvider.ContextLayout, null, function (_ref5) {
289
312
  var _cls2;
290
313
 
291
- var prefixCls = _ref2.prefixCls,
292
- _ref2$locale = _ref2.locale,
293
- locale = _ref2$locale === void 0 ? _mobileUtils.defaultLocale : _ref2$locale;
314
+ var prefixCls = _ref5.prefixCls,
315
+ _ref5$locale = _ref5.locale,
316
+ locale = _ref5$locale === void 0 ? _mobileUtils.defaultLocale : _ref5$locale;
294
317
  return /*#__PURE__*/_react.default.createElement("div", {
295
318
  className: (0, _mobileUtils.cls)(prefixCls + "-image-picker", className, (_cls2 = {}, _cls2[prefixCls + "-image-picker-disabled"] = disabled, _cls2)),
296
319
  style: style,
@@ -0,0 +1,174 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+ import { ImageProps } from '../image';
3
+ export interface ImagePickItem {
4
+ /**
5
+ * 图片地址
6
+ * @en Image Url
7
+ */
8
+ url: string;
9
+ /**
10
+ * 图片文件
11
+ * @en Image File
12
+ */
13
+ file?: File;
14
+ /**
15
+ * 图片状态
16
+ * @en Image Status
17
+ * @default 以图片自身加载状态而定
18
+ * @default_en According to inner status of the image
19
+ */
20
+ status?: 'loaded' | 'loading' | 'error';
21
+ }
22
+ export interface AdapterFile {
23
+ url?: string;
24
+ size: number;
25
+ name: string;
26
+ }
27
+ export interface SelectCallback {
28
+ files: AdapterFile[];
29
+ }
30
+ export interface ImagePickerProps {
31
+ /**
32
+ * 自定义类名
33
+ * @en Custom className
34
+ */
35
+ className?: string;
36
+ /**
37
+ * 自定义样式
38
+ * @en Custom stylesheet
39
+ */
40
+ style?: React.CSSProperties;
41
+ /**
42
+ * 已选择图片列表
43
+ * @en selected images list
44
+ */
45
+ images: ImagePickItem[];
46
+ /**
47
+ * 可以选择的文件类型
48
+ * @en Available File Types
49
+ * @default 'image/*'
50
+ */
51
+ accept?: string;
52
+ /**
53
+ * 是否支持多选
54
+ * @en Whether To Support Multiple Selection
55
+ */
56
+ multiple?: boolean;
57
+ /**
58
+ * 图片选取模式 Image selection mode [capture MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/capture)
59
+ * @en Whether To Support Multiple Selection [capture MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/capture)
60
+ */
61
+ capture?: InputHTMLAttributes<unknown>['capture'];
62
+ /**
63
+ * 一行展示图片张数
64
+ * @en The Number Of Pictures Displayed In A Row
65
+ * @default 3
66
+ */
67
+ columns?: number;
68
+ /**
69
+ * 格子间的间距
70
+ * @en spacing between grids
71
+ * @default 8
72
+ */
73
+ gutter?: number;
74
+ /**
75
+ * 最多选择图片张数,超出数量自动隐藏上传按钮,0表示不做限制
76
+ * @en max Pictures Can Choose
77
+ */
78
+ limit?: number;
79
+ /**
80
+ * 文件大小限制,单位为K
81
+ * @en File size limit, in K
82
+ */
83
+ maxSize?: number;
84
+ /**
85
+ * 是否隐藏删除Icon
86
+ * @en Whether to hide delete Icon
87
+ * @default false
88
+ */
89
+ hideDelete?: boolean;
90
+ /**
91
+ * 是否隐藏选择Icon
92
+ * @en Whether to hide Select Icon
93
+ * @default false
94
+ */
95
+ hideSelect?: boolean;
96
+ /**
97
+ * 是否总是展示选择Icon,默认情况下当图片数量超出limit值时会自动隐藏选择Icon
98
+ * @en Whether to always show Select Icon
99
+ * @default false
100
+ */
101
+ alwaysShowSelect?: boolean;
102
+ /**
103
+ * 禁用选择和删除图片
104
+ * @en Disable Select & Delete Image
105
+ */
106
+ disabled?: boolean;
107
+ /**
108
+ * 自定义删除图标
109
+ * @en Defined Delete Icon
110
+ */
111
+ deleteIcon?: React.ReactNode;
112
+ /**
113
+ * 自定义选择图标
114
+ * @en Defined Select Icon
115
+ */
116
+ selectIcon?: React.ReactNode;
117
+ /**
118
+ * 透传给图片的属性
119
+ * @en Attributes passed through to the image
120
+ */
121
+ imageProps?: Partial<ImageProps>;
122
+ /**
123
+ * 自定义上传失败展示
124
+ * @en Defined upload failed display
125
+ */
126
+ renderError?: (index?: number) => React.ReactNode | React.ReactNode;
127
+ /**
128
+ * 自定义上传中展示
129
+ * @en Defined uploading display
130
+ */
131
+ renderLoading?: (index?: number) => React.ReactNode | React.ReactNode;
132
+ /**
133
+ * 上传方法
134
+ * @en upload function
135
+ */
136
+ upload?: (file: ImagePickItem) => Promise<ImagePickItem | null>;
137
+ /**
138
+ * 已选图片列表发生变化
139
+ * @en The list of selected images changes
140
+ */
141
+ onChange?: (fileList: ImagePickItem[]) => void;
142
+ /**
143
+ * 图片超过限制大小
144
+ * @en Image exceeds size limit
145
+ */
146
+ onMaxSizeExceed?: (file: File) => void;
147
+ /**
148
+ * 选择张数超过限制
149
+ * @en The number of pictures exceeds the limit
150
+ */
151
+ onLimitExceed?: (files: File[]) => void;
152
+ /**
153
+ * 图片点击
154
+ * @en click event
155
+ */
156
+ onClick?: (e: React.MouseEvent<HTMLElement, MouseEvent>, image: ImagePickItem, index: number) => void;
157
+ /**
158
+ * 图片长按事件
159
+ * @en long press event
160
+ */
161
+ onLongPress?: (e: React.TouchEvent<HTMLElement>, image: ImagePickItem, index: number) => void;
162
+ /**
163
+ * 图片选择适配器
164
+ * @en Select Adaptor
165
+ */
166
+ selectAdapter?: () => Promise<SelectCallback>;
167
+ }
168
+ export interface ImagePickerRef {
169
+ /**
170
+ * 最外层 DOM 元素
171
+ * @en The outer DOM element of the component
172
+ */
173
+ dom: HTMLDivElement | null;
174
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
@@ -280,7 +280,7 @@ declare const _default: React.ForwardRefExoticComponent<ImagePreviewProps & Reac
280
280
  /**
281
281
  * 图片预览组件,支持循环轮播、双指/双击缩放、缩略图放大效果。
282
282
  * @en The image preview, supports circular rotation, two-finger/double-tap zoom, and thumbnail zoom effects.
283
- * @type 数据展示
283
+ * @type 信息展示
284
284
  * @type_en Data Display
285
285
  * @name 图片预览
286
286
  * @name_en ImagePreview
@@ -1018,7 +1018,7 @@ function methodsGenerator(Comp) {
1018
1018
  /**
1019
1019
  * 图片预览组件,支持循环轮播、双指/双击缩放、缩略图放大效果。
1020
1020
  * @en The image preview, supports circular rotation, two-finger/double-tap zoom, and thumbnail zoom effects.
1021
- * @type 数据展示
1021
+ * @type 信息展示
1022
1022
  * @type_en Data Display
1023
1023
  * @name 图片预览
1024
1024
  * @name_en ImagePreview
package/cjs/index.d.ts CHANGED
@@ -41,8 +41,10 @@ export { default as PullRefresh } from './pull-refresh';
41
41
  export { default as Radio } from './radio';
42
42
  export { default as Rate } from './rate';
43
43
  export { default as Slider } from './slider';
44
+ export { default as SearchBar } from './search-bar';
44
45
  export { default as Steps } from './steps';
45
46
  export { default as Sticky } from './sticky';
47
+ export { default as SwipeAction } from './swipe-action';
46
48
  export { default as SwipeLoad } from './swipe-load';
47
49
  export { default as TabBar } from './tab-bar';
48
50
  export { default as Tag } from './tag';
package/cjs/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
5
  exports.__esModule = true;
6
- exports.Transition = exports.Toast = exports.Textarea = exports.Tag = exports.Tabs = exports.TabBar = exports.Switch = exports.SwipeLoad = exports.Sticky = exports.Steps = exports.Slider = exports.ShowMonitor = exports.Rate = exports.Radio = exports.PullRefresh = exports.Progress = exports.Portal = exports.PopupSwiper = exports.Popup = exports.Popover = exports.PickerView = exports.Picker = exports.Pagination = exports.Notify = exports.NoticeBar = exports.NavBar = exports.Masking = exports.Loading = exports.LoadMore = exports.Input = exports.ImagePreview = exports.ImagePicker = exports.Image = exports.Grid = exports.Ellipsis = exports.DropdownMenu = exports.Dropdown = exports.Dialog = exports.DatePicker = exports.CountDown = exports.ContextProvider = exports.Collapse = exports.CircleProgress = exports.Checkbox = exports.Cell = exports.Carousel = exports.Button = exports.Badge = exports.Avatar = exports.ActionSheet = void 0;
6
+ exports.Transition = exports.Toast = exports.Textarea = exports.Tag = exports.Tabs = exports.TabBar = exports.Switch = exports.SwipeLoad = exports.SwipeAction = exports.Sticky = exports.Steps = exports.Slider = exports.ShowMonitor = exports.SearchBar = exports.Rate = exports.Radio = exports.PullRefresh = exports.Progress = exports.Portal = exports.PopupSwiper = exports.Popup = exports.Popover = exports.PickerView = exports.Picker = exports.Pagination = exports.Notify = exports.NoticeBar = exports.NavBar = exports.Masking = exports.Loading = exports.LoadMore = exports.Input = exports.ImagePreview = exports.ImagePicker = exports.Image = exports.Grid = exports.Ellipsis = exports.DropdownMenu = exports.Dropdown = exports.Dialog = exports.DatePicker = exports.CountDown = exports.ContextProvider = exports.Collapse = exports.CircleProgress = exports.Checkbox = exports.Cell = exports.Carousel = exports.Button = exports.Badge = exports.Avatar = exports.ActionSheet = void 0;
7
7
 
8
8
  var _actionSheet = _interopRequireDefault(require("./action-sheet"));
9
9
 
@@ -177,6 +177,10 @@ var _slider = _interopRequireDefault(require("./slider"));
177
177
 
178
178
  exports.Slider = _slider.default;
179
179
 
180
+ var _searchBar = _interopRequireDefault(require("./search-bar"));
181
+
182
+ exports.SearchBar = _searchBar.default;
183
+
180
184
  var _steps = _interopRequireDefault(require("./steps"));
181
185
 
182
186
  exports.Steps = _steps.default;
@@ -185,6 +189,10 @@ var _sticky = _interopRequireDefault(require("./sticky"));
185
189
 
186
190
  exports.Sticky = _sticky.default;
187
191
 
192
+ var _swipeAction = _interopRequireDefault(require("./swipe-action"));
193
+
194
+ exports.SwipeAction = _swipeAction.default;
195
+
188
196
  var _swipeLoad = _interopRequireDefault(require("./swipe-load"));
189
197
 
190
198
  exports.SwipeLoad = _swipeLoad.default;
@@ -45,6 +45,8 @@ function useInputLogic(props, inputRef) {
45
45
  clearShowType = _props$clearShowType === void 0 ? 'focus' : _props$clearShowType,
46
46
  _props$clearIcon = props.clearIcon,
47
47
  clearIcon = _props$clearIcon === void 0 ? /*#__PURE__*/_react.default.createElement(_IconClear.default, null) : _props$clearIcon,
48
+ _props$preventEventWh = props.preventEventWhenClearing,
49
+ preventEventWhenClearing = _props$preventEventWh === void 0 ? true : _props$preventEventWh,
48
50
  onClear = props.onClear,
49
51
  autoFocus = props.autoFocus;
50
52
 
@@ -57,8 +59,30 @@ function useInputLogic(props, inputRef) {
57
59
  }),
58
60
  showClear = _useState2[0],
59
61
  toggleClear = _useState2[1];
60
-
61
- var focusingRef = (0, _react.useRef)(false);
62
+ /**
63
+ * clear相关问题背景
64
+ * 如果点击clear按钮之前已经是focusing状态了,那么在点完clear按钮之后会手动聚焦一下
65
+ * 该行为将导致onClear事件触发时,也会触发一次onBlur和onFocus事件,可能影响一些组件外的代码逻辑
66
+ *
67
+ * e.g. 假设input按钮右侧有一个按钮仅在聚焦时展示
68
+ * 实现代码大致是:onBlur设置其visible为false,onFocus设置其visible为true
69
+ * 那么这个按钮就会因为clear的点击造成一瞬的闪烁
70
+ *
71
+ * 解决思路
72
+ * 先来看一下,在输入框已激活的状态时,点击清除按钮后,组件的一些事件的触发顺序
73
+ * handleBlur -> handleClear -> handleFocus -> onBlur(外部回调) -> onFocus(外部回调)
74
+ * 可以看到外部的onBlur和onFocus回调都是在handleClear函数之后被调用
75
+ * 因此可以在handleClear中设置一个shouldPreventEvent的boolean标志
76
+ * 如果这个标志为true,则跳过调用外部的onBlur和onFocus,并在最后再将标志置回false
77
+ *
78
+ */
79
+
80
+
81
+ var _useState3 = (0, _react.useState)(false),
82
+ isFocusing = _useState3[0],
83
+ setIsFocusing = _useState3[1];
84
+
85
+ var shouldPreventEvent = (0, _react.useRef)(false);
62
86
  var actualInputValue = value !== void 0 ? value : inputValue;
63
87
  var system = (0, _helpers.useSystem)();
64
88
  var wrapRef = (0, _react.useRef)(null);
@@ -126,7 +150,12 @@ function useInputLogic(props, inputRef) {
126
150
 
127
151
  function handleFocus(e) {
128
152
  (0, _mobileUtils.nextTick)(function () {
129
- focusingRef.current = true;
153
+ if (preventEventWhenClearing && shouldPreventEvent.current) {
154
+ shouldPreventEvent.current = false;
155
+ return;
156
+ }
157
+
158
+ setIsFocusing(true);
130
159
  clearShowType === 'focus' && toggleClear(true);
131
160
  onFocus && onFocus(e);
132
161
  });
@@ -134,7 +163,11 @@ function useInputLogic(props, inputRef) {
134
163
 
135
164
  function handleBlur(e) {
136
165
  (0, _mobileUtils.nextTick)(function () {
137
- focusingRef.current = false;
166
+ if (preventEventWhenClearing && shouldPreventEvent.current) {
167
+ return;
168
+ }
169
+
170
+ setIsFocusing(false);
138
171
  clearShowType === 'focus' && toggleClear(false);
139
172
  onBlur && onBlur(e);
140
173
  });
@@ -143,7 +176,7 @@ function useInputLogic(props, inputRef) {
143
176
  function handleClick(e) {
144
177
  // 安卓才会有键盘切换不过来的问题,ios不开启此项,因为blur之后不能再自动focus
145
178
  // @en Android will have the problem that the keyboard cannot be switched. iOS does not enable this, because it can no longer automatically focus after blur.
146
- if (blurBeforeFocus && system === 'android' && !focusingRef.current) {
179
+ if (blurBeforeFocus && system === 'android' && !isFocusing) {
147
180
  inputRef.current && inputRef.current.blur();
148
181
  (0, _mobileUtils.nextTick)(function () {
149
182
  inputRef.current && inputRef.current.focus();
@@ -166,18 +199,26 @@ function useInputLogic(props, inputRef) {
166
199
  onClear && onClear(e); // 当点击clear前是focus时强制执行focus
167
200
  // @en Enforce focus when focus is before clicking clear
168
201
 
169
- if (focusingRef.current) {
202
+ if (isFocusing) {
203
+ if (preventEventWhenClearing) {
204
+ shouldPreventEvent.current = true;
205
+ }
206
+
170
207
  inputRef.current && inputRef.current.focus();
171
208
  }
172
209
  });
173
210
  }
174
211
 
212
+ function renderPendNode(pend) {
213
+ return typeof pend === 'function' ? pend(isFocusing, actualInputValue) : pend;
214
+ }
215
+
175
216
  function renderWrapper(prefixCls, type, children) {
176
217
  return /*#__PURE__*/_react.default.createElement("div", {
177
218
  className: prefixCls + "-container all-border-box " + (className || ''),
178
219
  style: style,
179
220
  ref: wrapRef
180
- }, prepend, /*#__PURE__*/_react.default.createElement("div", {
221
+ }, renderPendNode(prepend), /*#__PURE__*/_react.default.createElement("div", {
181
222
  className: (0, _mobileUtils.cls)(prefixCls + "-wrap", type, "border-" + border, system, {
182
223
  disabled: disabled
183
224
  }, {
@@ -196,7 +237,7 @@ function useInputLogic(props, inputRef) {
196
237
  onClick: handleClear
197
238
  }, clearIcon) : null, suffix ? /*#__PURE__*/_react.default.createElement("div", {
198
239
  className: prefixCls + "-suffix"
199
- }, suffix) : null), append);
240
+ }, suffix) : null), renderPendNode(append));
200
241
  }
201
242
 
202
243
  return {
@@ -43,7 +43,7 @@ export interface InputRef {
43
43
  /**
44
44
  * 输入框组件,支持添加前后缀。
45
45
  * @en The input box, supports adding prefixes and suffixes.
46
- * @type 数据输入
46
+ * @type 数据录入
47
47
  * @type_en Data Entry
48
48
  * @name 输入框
49
49
  * @name_en Input
@@ -22,7 +22,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
22
22
  /**
23
23
  * 输入框组件,支持添加前后缀。
24
24
  * @en The input box, supports adding prefixes and suffixes.
25
- * @type 数据输入
25
+ * @type 数据录入
26
26
  * @type_en Data Entry
27
27
  * @name 输入框
28
28
  * @name_en Input
@@ -80,12 +80,12 @@ export interface BasicInputProps<T = HTMLInputElement> {
80
80
  * 输入框头部内容,在输入框外部
81
81
  * @en The content of the header of the input box, outside the input box
82
82
  */
83
- prepend?: React.ReactNode;
83
+ prepend?: React.ReactNode | ((focusing: boolean, inputValue: string) => React.ReactNode);
84
84
  /**
85
85
  * 输入框尾部内容,在输入框外部
86
86
  * @en The content at the end of the input box, outside the input box
87
87
  */
88
- append?: React.ReactNode;
88
+ append?: React.ReactNode | ((focusing: boolean, inputValue: string) => React.ReactNode);
89
89
  /**
90
90
  * 在聚焦之前blur掉,即切换不同input时会重新弹起键盘,常用于input type切换时重新加载键盘,安卓上有效
91
91
  * @en Blur before focusing, that is, the keyboard will be re-bounced when switching between different inputs. It is often used to reload the keyboard when the input type is switched. It is valid on Android.
@@ -102,6 +102,12 @@ export interface BasicInputProps<T = HTMLInputElement> {
102
102
  * @default "focus"
103
103
  */
104
104
  clearShowType?: 'focus' | 'value' | 'always';
105
+ /**
106
+ * 在聚焦模式下点击清除按钮时,是否要屏蔽对应产生的onBlur和onFocus事件
107
+ * @en Whether to block the onBlur and onFocus events generated when the clear button is clicked in focus mode
108
+ * @default true
109
+ */
110
+ preventEventWhenClearing?: boolean;
105
111
  /**
106
112
  * 清除按钮类型,也可自定义
107
113
  * @en Clear button type, also customizable
@@ -98,7 +98,7 @@ export interface NoticeBarRef {
98
98
  /**
99
99
  * 可自定义换行或滚动效果,支持循环滚动。
100
100
  * @en Line wrapping or scrolling effects can be customized, and circular scrolling is supported.
101
- * @type 数据展示
101
+ * @type 信息展示
102
102
  * @type_en Data Display
103
103
  * @name 通知栏
104
104
  * @name_en NoticeBar
@@ -20,7 +20,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
20
20
  /**
21
21
  * 可自定义换行或滚动效果,支持循环滚动。
22
22
  * @en Line wrapping or scrolling effects can be customized, and circular scrolling is supported.
23
- * @type 数据展示
23
+ * @type 信息展示
24
24
  * @type_en Data Display
25
25
  * @name 通知栏
26
26
  * @name_en NoticeBar
@@ -38,7 +38,7 @@ export interface PickerRef {
38
38
  /**
39
39
  * 选择器组件,形式是弹起的浮层。
40
40
  * @en The selector component, in the form of a popup layer.
41
- * @type 数据输入
41
+ * @type 数据录入
42
42
  * @type_en Data Entry
43
43
  * @name 选择器
44
44
  * @name_en Picker
@@ -82,7 +82,7 @@ var getInitialValue = function getInitialValue(value, data, cascade) {
82
82
  /**
83
83
  * 选择器组件,形式是弹起的浮层。
84
84
  * @en The selector component, in the form of a popup layer.
85
- * @type 数据输入
85
+ * @type 数据录入
86
86
  * @type_en Data Entry
87
87
  * @name 选择器
88
88
  * @name_en Picker
@@ -45,7 +45,7 @@ export interface PickerViewRef {
45
45
  /**
46
46
  * 选择器视图组件,不含弹窗,方便使用方灵活定制选择器。
47
47
  * @en The picker view component, not has contain popup, which is convenient for the user to flexibly customize the picker.
48
- * @type 数据输入
48
+ * @type 数据录入
49
49
  * @type_en Data Entry
50
50
  * @name 选择器视图
51
51
  * @name_en PickerView
@@ -46,7 +46,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
46
46
  /**
47
47
  * 选择器视图组件,不含弹窗,方便使用方灵活定制选择器。
48
48
  * @en The picker view component, not has contain popup, which is convenient for the user to flexibly customize the picker.
49
- * @type 数据输入
49
+ * @type 数据录入
50
50
  * @type_en Data Entry
51
51
  * @name 选择器视图
52
52
  * @name_en PickerView
@@ -8,7 +8,7 @@ declare const _default: import("react").ForwardRefExoticComponent<Partial<import
8
8
  * @en Bubble card, supports six directions, small arrows are centered in each direction based on the mounted sub-elements, and supports controlled and uncontrolled modes.
9
9
  * @name 气泡卡片
10
10
  * @name_en Popover
11
- * @type 数据展示
11
+ * @type 信息展示
12
12
  * @type_en Data Display
13
13
  */
14
14
  export default _default;
@@ -29,7 +29,7 @@ var Menu = (0, _menu.componentGenerator)(_popover.Popover);
29
29
  * @en Bubble card, supports six directions, small arrows are centered in each direction based on the mounted sub-elements, and supports controlled and uncontrolled modes.
30
30
  * @name 气泡卡片
31
31
  * @name_en Popover
32
- * @type 数据展示
32
+ * @type 信息展示
33
33
  * @type_en Data Display
34
34
  */
35
35
 
@@ -139,13 +139,14 @@ var PopupSwiper = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
139
139
  var movingFromDirec = allowedDirections.includes(fromDirec) ? fromDirec : '';
140
140
  var disDirection = exitDirection || movingFromDirec;
141
141
  var direcValue = ['top', 'bottom'].includes(disDirection) ? 'Y' : 'X';
142
+ var direcRatio = ['bottom', 'right'].includes(disDirection) ? 1 : -1;
142
143
 
143
144
  switch (movingFromDirec) {
144
145
  case 'top':
145
146
  case 'bottom':
146
147
  setDistance({
147
148
  direction: direcValue,
148
- value: Math[movingFromDirec === 'top' ? 'min' : 'max'](0, disY)
149
+ value: Math.abs(disY) * direcRatio
149
150
  });
150
151
  break;
151
152
 
@@ -153,7 +154,7 @@ var PopupSwiper = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
153
154
  case 'right':
154
155
  setDistance({
155
156
  direction: direcValue,
156
- value: Math[movingFromDirec === 'left' ? 'min' : 'max'](0, disX)
157
+ value: Math.abs(disX) * direcRatio
157
158
  });
158
159
  break;
159
160
 
@@ -8,7 +8,7 @@ declare const _default: import("react").ForwardRefExoticComponent<import("./type
8
8
  * @en Radio button, click to switch selection when available, supports disabled state and radio option group.
9
9
  * @name 单选框
10
10
  * @name_en Radio
11
- * @type 数据输入
11
+ * @type 数据录入
12
12
  * @type_en Data Entry
13
13
  */
14
14
  export default _default;