@hi-ui/hiui 3.9.0-rc.8 → 4.0.0-beta.1

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 (544) hide show
  1. package/README.md +5 -79
  2. package/lib/cjs/index.js +576 -0
  3. package/lib/cjs/index.js.map +1 -0
  4. package/lib/esm/index.js +66 -0
  5. package/lib/esm/index.js.map +1 -0
  6. package/lib/types/index.d.ts +56 -0
  7. package/package.json +101 -184
  8. package/CHANGELOG.md +0 -330
  9. package/es/_util/EventEmitter.js +0 -56
  10. package/es/_util/SwitchVersion.js +0 -40
  11. package/es/_util/depreactedPropsCompat.js +0 -58
  12. package/es/_util/deprecatedPropsCheck.js +0 -21
  13. package/es/_util/index.js +0 -31
  14. package/es/_util/warning.js +0 -19
  15. package/es/alert/Alert.js +0 -129
  16. package/es/alert/__tests__/index.test.js +0 -84
  17. package/es/alert/index.d.ts +0 -18
  18. package/es/alert/index.js +0 -20
  19. package/es/alert/style/index.css +0 -1
  20. package/es/alert/style/index.js +0 -3
  21. package/es/badge/Badge.js +0 -94
  22. package/es/badge/__tests__/index.test.js +0 -82
  23. package/es/badge/index.d.ts +0 -15
  24. package/es/badge/index.js +0 -22
  25. package/es/badge/style/index.css +0 -1
  26. package/es/badge/style/index.js +0 -3
  27. package/es/base-css/index.js +0 -3
  28. package/es/base-css/style/index.css +0 -1
  29. package/es/base-css/style/index.js +0 -3
  30. package/es/breadcrumb/__tests__/index.test.js +0 -61
  31. package/es/breadcrumb/index.d.ts +0 -19
  32. package/es/breadcrumb/index.js +0 -72
  33. package/es/breadcrumb/style/index.css +0 -1
  34. package/es/breadcrumb/style/index.js +0 -3
  35. package/es/button/Button.js +0 -158
  36. package/es/button/ButtonGroup.js +0 -63
  37. package/es/button/IconLoading.js +0 -27
  38. package/es/button/__tests__/index.test.js +0 -221
  39. package/es/button/index.d.ts +0 -26
  40. package/es/button/index.js +0 -19
  41. package/es/button/style/index.css +0 -1
  42. package/es/button/style/index.js +0 -3
  43. package/es/card/CoverCard.js +0 -41
  44. package/es/card/NormalCard.js +0 -46
  45. package/es/card/SimpleCard.js +0 -32
  46. package/es/card/__tests__/index.test.js +0 -180
  47. package/es/card/index.d.ts +0 -18
  48. package/es/card/index.js +0 -75
  49. package/es/card/style/index.css +0 -1
  50. package/es/card/style/index.js +0 -3
  51. package/es/carousel/__tests__/index.test.js +0 -104
  52. package/es/carousel/index.d.ts +0 -13
  53. package/es/carousel/index.js +0 -242
  54. package/es/carousel/style/index.css +0 -1
  55. package/es/carousel/style/index.js +0 -3
  56. package/es/cascader/Cascader.js +0 -530
  57. package/es/cascader/Menu.js +0 -147
  58. package/es/cascader/__tests__/index.test.js +0 -393
  59. package/es/cascader/img/empty.png +0 -0
  60. package/es/cascader/index.d.ts +0 -36
  61. package/es/cascader/index.js +0 -15
  62. package/es/cascader/style/cascader.css +0 -1
  63. package/es/cascader/style/index.js +0 -5
  64. package/es/cascader/style/menu.css +0 -1
  65. package/es/cascader/utils.js +0 -216
  66. package/es/charts/hi-echarts-theme-default.json +0 -502
  67. package/es/charts/index.d.ts +0 -12
  68. package/es/charts/index.js +0 -32
  69. package/es/checkbox/Checkbox.js +0 -145
  70. package/es/checkbox/Group.js +0 -198
  71. package/es/checkbox/__tests__/index.test.js +0 -226
  72. package/es/checkbox/checkbox-legacy/Base.js +0 -216
  73. package/es/checkbox/checkbox-legacy/CheckBox.js +0 -161
  74. package/es/checkbox/checkbox-legacy/common.js +0 -47
  75. package/es/checkbox/checkbox-legacy/index.js +0 -15
  76. package/es/checkbox/checkbox-legacy/style/index.css +0 -1
  77. package/es/checkbox/checkbox-legacy/style/index.js +0 -3
  78. package/es/checkbox/index.d.ts +0 -35
  79. package/es/checkbox/index.js +0 -38
  80. package/es/checkbox/style/index.css +0 -1
  81. package/es/checkbox/style/index.js +0 -3
  82. package/es/collapse/Panel.js +0 -135
  83. package/es/collapse/__tests__/index.test.js +0 -111
  84. package/es/collapse/index.d.ts +0 -24
  85. package/es/collapse/index.js +0 -197
  86. package/es/collapse/style/index.css +0 -1
  87. package/es/collapse/style/index.js +0 -3
  88. package/es/context/index.d.ts +0 -3
  89. package/es/context/index.js +0 -120
  90. package/es/counter/Counter.js +0 -369
  91. package/es/counter/__tests__/index.test.js +0 -134
  92. package/es/counter/counter-legacy/index.js +0 -271
  93. package/es/counter/index.d.ts +0 -13
  94. package/es/counter/index.js +0 -29
  95. package/es/counter/style/index.css +0 -1
  96. package/es/counter/style/index.js +0 -3
  97. package/es/date-picker/BasePicker.js +0 -325
  98. package/es/date-picker/TimePicker.d.ts +0 -23
  99. package/es/date-picker/TimePicker.js +0 -211
  100. package/es/date-picker/__tests__/index.test.js +0 -957
  101. package/es/date-picker/components/Calender.js +0 -274
  102. package/es/date-picker/components/Header.js +0 -98
  103. package/es/date-picker/components/Input.js +0 -103
  104. package/es/date-picker/components/Panel.js +0 -145
  105. package/es/date-picker/components/PickerIcon.js +0 -33
  106. package/es/date-picker/components/RangePanel.js +0 -353
  107. package/es/date-picker/components/Root.js +0 -128
  108. package/es/date-picker/components/Time.js +0 -258
  109. package/es/date-picker/components/TimeList.js +0 -193
  110. package/es/date-picker/components/TimePanel.js +0 -67
  111. package/es/date-picker/components/TimePeriodPanel.js +0 -78
  112. package/es/date-picker/constants.js +0 -54
  113. package/es/date-picker/context.js +0 -15
  114. package/es/date-picker/hooks/index.js +0 -47
  115. package/es/date-picker/hooks/useAltData.js +0 -112
  116. package/es/date-picker/hooks/useCalenderData.js +0 -371
  117. package/es/date-picker/hooks/useDate.js +0 -46
  118. package/es/date-picker/hooks/useFormat.js +0 -27
  119. package/es/date-picker/hooks/usePlaceholder.js +0 -43
  120. package/es/date-picker/hooks/useTimePeriodData.js +0 -29
  121. package/es/date-picker/index.d.ts +0 -61
  122. package/es/date-picker/index.js +0 -31
  123. package/es/date-picker/style/index.css +0 -1
  124. package/es/date-picker/style/index.js +0 -3
  125. package/es/date-picker/style/timepicker.css +0 -1
  126. package/es/date-picker/style/timepicker.js +0 -3
  127. package/es/date-picker/toLunar.js +0 -172
  128. package/es/date-picker/utils.js +0 -347
  129. package/es/drawer/index.d.ts +0 -18
  130. package/es/drawer/index.js +0 -133
  131. package/es/drawer/style/index.css +0 -1
  132. package/es/drawer/style/index.js +0 -3
  133. package/es/dropdown/Dropdown.js +0 -239
  134. package/es/dropdown/DropdownButton.js +0 -105
  135. package/es/dropdown/DropdownMenu.js +0 -119
  136. package/es/dropdown/DropdownMenuItem.js +0 -176
  137. package/es/dropdown/__tests__/index.test.js +0 -313
  138. package/es/dropdown/index.d.ts +0 -29
  139. package/es/dropdown/index.js +0 -88
  140. package/es/dropdown/style/index.css +0 -1
  141. package/es/dropdown/style/index.js +0 -3
  142. package/es/dropdown/tests/index.test.js +0 -76
  143. package/es/dropdown/utils.js +0 -35
  144. package/es/ficon/index.js +0 -56
  145. package/es/ficon/style/_fa/font-awesome.css +0 -1
  146. package/es/ficon/style/fonts/FontAwesome.otf +0 -0
  147. package/es/ficon/style/fonts/fontawesome-webfont.eot +0 -0
  148. package/es/ficon/style/fonts/fontawesome-webfont.svg +0 -2671
  149. package/es/ficon/style/fonts/fontawesome-webfont.ttf +0 -0
  150. package/es/ficon/style/fonts/fontawesome-webfont.woff +0 -0
  151. package/es/ficon/style/fonts/fontawesome-webfont.woff2 +0 -0
  152. package/es/ficon/style/index.css +0 -1
  153. package/es/ficon/style/index.js +0 -3
  154. package/es/filter/index.d.ts +0 -18
  155. package/es/filter/index.js +0 -146
  156. package/es/filter/style/index.css +0 -1
  157. package/es/filter/style/index.js +0 -3
  158. package/es/form/Form.js +0 -425
  159. package/es/form/FormContext.js +0 -15
  160. package/es/form/FormReducer.js +0 -144
  161. package/es/form/Item.js +0 -557
  162. package/es/form/List.js +0 -127
  163. package/es/form/Reset.js +0 -41
  164. package/es/form/SchemaForm.js +0 -129
  165. package/es/form/Submit.js +0 -39
  166. package/es/form/__tests__/index.test.js +0 -575
  167. package/es/form/form-legacy/form-v2/Form.js +0 -175
  168. package/es/form/form-legacy/form-v2/Item.js +0 -283
  169. package/es/form/form-legacy/form-v2/__tests__/index.test.js +0 -575
  170. package/es/form/form-legacy/form-v2/index.js +0 -27
  171. package/es/form/form-legacy/form-v2/style/index.css +0 -1
  172. package/es/form/form-legacy/form-v2/style/index.js +0 -3
  173. package/es/form/hooks/useForm.js +0 -48
  174. package/es/form/hooks/useFormInstance.js +0 -46
  175. package/es/form/index.d.ts +0 -80
  176. package/es/form/index.js +0 -47
  177. package/es/form/style/index.css +0 -1
  178. package/es/form/style/index.js +0 -3
  179. package/es/form/test.js +0 -52
  180. package/es/form/utils.js +0 -77
  181. package/es/grid/__tests__/index.test.js +0 -100
  182. package/es/grid/index.d.ts +0 -38
  183. package/es/grid/index.js +0 -178
  184. package/es/grid/style/index.css +0 -1
  185. package/es/grid/style/index.js +0 -3
  186. package/es/hi-base-table/index.d.ts +0 -675
  187. package/es/hi-base-table/index.js +0 -226
  188. package/es/hi-base-table/style/hiui-basetable-theme.css +0 -1
  189. package/es/hi-base-table/style/index.js +0 -3
  190. package/es/hi-request/axios.d.ts +0 -5
  191. package/es/hi-request/axios.js +0 -40
  192. package/es/hi-request/download.d.ts +0 -5
  193. package/es/hi-request/download.js +0 -30
  194. package/es/hi-request/index.d.ts +0 -4
  195. package/es/hi-request/index.js +0 -4
  196. package/es/hi-request/jsonp.d.ts +0 -5
  197. package/es/hi-request/jsonp.js +0 -66
  198. package/es/hi-request/mixin.d.ts +0 -3
  199. package/es/hi-request/mixin.js +0 -42
  200. package/es/hi-request/type.d.ts +0 -69
  201. package/es/hi-request/type.js +0 -0
  202. package/es/hi-request/upload.d.ts +0 -5
  203. package/es/hi-request/upload.js +0 -23
  204. package/es/hi-request/utils.d.ts +0 -1
  205. package/es/hi-request/utils.js +0 -3
  206. package/es/icon/iconfont.js +0 -48
  207. package/es/icon/index.d.ts +0 -13
  208. package/es/icon/index.js +0 -101
  209. package/es/icon/style/index.css +0 -1
  210. package/es/icon/style/index.js +0 -3
  211. package/es/index.d.ts +0 -95
  212. package/es/index.js +0 -58
  213. package/es/input/Input.js +0 -420
  214. package/es/input/__tests__/index.test.js +0 -377
  215. package/es/input/index.d.ts +0 -27
  216. package/es/input/index.js +0 -44
  217. package/es/input/input-legacy/index.js +0 -349
  218. package/es/input/input-legacy/util.js +0 -176
  219. package/es/input/style/index.css +0 -1
  220. package/es/input/style/index.js +0 -5
  221. package/es/input/util.js +0 -191
  222. package/es/lib/withDragDropContext.js +0 -16
  223. package/es/list/IconText.js +0 -40
  224. package/es/list/Item.js +0 -63
  225. package/es/list/index.d.ts +0 -30
  226. package/es/list/index.js +0 -159
  227. package/es/list/style/index.css +0 -1
  228. package/es/list/style/index.js +0 -3
  229. package/es/loading/Loading.js +0 -185
  230. package/es/loading/__tests__/index.test.js +0 -110
  231. package/es/loading/index.d.ts +0 -24
  232. package/es/loading/index.js +0 -18
  233. package/es/loading/style/index.css +0 -1
  234. package/es/loading/style/index.js +0 -3
  235. package/es/locales/en-US.js +0 -138
  236. package/es/locales/index.js +0 -25
  237. package/es/locales/zh-CN.js +0 -141
  238. package/es/locales/zh-Hant-HK.js +0 -141
  239. package/es/locales/zh-Hant-TW.js +0 -141
  240. package/es/menu/Item.js +0 -100
  241. package/es/menu/Menu.js +0 -420
  242. package/es/menu/SubMenu.js +0 -218
  243. package/es/menu/Title.js +0 -84
  244. package/es/menu/__tests__/index.test.js +0 -275
  245. package/es/menu/index.d.ts +0 -26
  246. package/es/menu/index.js +0 -24
  247. package/es/menu/style/index.css +0 -1
  248. package/es/menu/style/index.js +0 -3
  249. package/es/message/__tests__/index.test.js +0 -71
  250. package/es/message/index.d.ts +0 -18
  251. package/es/message/index.js +0 -70
  252. package/es/message/style/index.css +0 -1
  253. package/es/message/style/index.js +0 -5
  254. package/es/modal/__tests__/index.test.js +0 -178
  255. package/es/modal/index.d.ts +0 -33
  256. package/es/modal/index.js +0 -312
  257. package/es/modal/style/index.css +0 -1
  258. package/es/modal/style/index.js +0 -3
  259. package/es/notice/Notice.js +0 -138
  260. package/es/notice/NoticeContainer.js +0 -109
  261. package/es/notice/__tests__/index.test.js +0 -174
  262. package/es/notice/index.js +0 -66
  263. package/es/notice/style/index.css +0 -1
  264. package/es/notice/style/index.js +0 -5
  265. package/es/notification/HandleNotification/index.js +0 -220
  266. package/es/notification/HandleNotification/style/index.css +0 -1
  267. package/es/notification/HandleNotification/style/index.js +0 -5
  268. package/es/notification/__tests__/index.test.js +0 -114
  269. package/es/notification/index.d.ts +0 -25
  270. package/es/notification/index.js +0 -87
  271. package/es/notification/style/index.css +0 -1
  272. package/es/notification/style/index.js +0 -5
  273. package/es/pagination/Pager.js +0 -57
  274. package/es/pagination/Pagination.js +0 -538
  275. package/es/pagination/__tests__/index.test.js +0 -244
  276. package/es/pagination/index.d.ts +0 -20
  277. package/es/pagination/index.js +0 -18
  278. package/es/pagination/style/index.css +0 -1
  279. package/es/pagination/style/index.js +0 -5
  280. package/es/popover/__tests__/index.test.js +0 -152
  281. package/es/popover/index.d.ts +0 -14
  282. package/es/popover/index.js +0 -220
  283. package/es/popover/style/index.css +0 -1
  284. package/es/popover/style/index.js +0 -3
  285. package/es/popper/Overlay.js +0 -246
  286. package/es/popper/Portal.js +0 -42
  287. package/es/popper/index.js +0 -90
  288. package/es/popper/style/index.css +0 -1
  289. package/es/popper/style/index.js +0 -3
  290. package/es/popper/utils/popper.js +0 -311
  291. package/es/popper/utils/positionUtils.js +0 -314
  292. package/es/popper/utils/useClickOutside.js +0 -37
  293. package/es/popper/utils/useWaitForDOMRef.js +0 -56
  294. package/es/preview/index.d.ts +0 -16
  295. package/es/preview/index.js +0 -442
  296. package/es/preview/style/index.css +0 -1
  297. package/es/preview/style/index.js +0 -3
  298. package/es/progress/BarProgress.js +0 -157
  299. package/es/progress/CircleProgress.js +0 -49
  300. package/es/progress/DashboardProgress.js +0 -60
  301. package/es/progress/Progress.js +0 -111
  302. package/es/progress/__tests__/index.test.js +0 -131
  303. package/es/progress/index.d.ts +0 -18
  304. package/es/progress/index.js +0 -15
  305. package/es/progress/style/index.css +0 -1
  306. package/es/progress/style/index.js +0 -3
  307. package/es/radio/Group.js +0 -280
  308. package/es/radio/Radio.js +0 -167
  309. package/es/radio/__tests__/index.test.js +0 -128
  310. package/es/radio/index.d.ts +0 -32
  311. package/es/radio/index.js +0 -31
  312. package/es/radio/radio-legacy/__test__/index.test.js +0 -79
  313. package/es/radio/radio-legacy/index.js +0 -218
  314. package/es/radio/radio-legacy/style/index.css +0 -1
  315. package/es/radio/radio-legacy/style/index.js +0 -3
  316. package/es/radio/style/index.css +0 -1
  317. package/es/radio/style/index.js +0 -3
  318. package/es/rate/Icons.js +0 -294
  319. package/es/rate/Rate.js +0 -316
  320. package/es/rate/__tests__/index.test.js +0 -124
  321. package/es/rate/index.d.ts +0 -22
  322. package/es/rate/index.js +0 -15
  323. package/es/rate/style/index.css +0 -1
  324. package/es/rate/style/index.js +0 -3
  325. package/es/rich-text-editor/index.d.ts +0 -8
  326. package/es/rich-text-editor/index.js +0 -67
  327. package/es/rich-text-editor/style/index.css +0 -1
  328. package/es/rich-text-editor/style/index.js +0 -9
  329. package/es/search/index.d.ts +0 -23
  330. package/es/search/index.js +0 -264
  331. package/es/search/searchDropdown.js +0 -111
  332. package/es/search/style/index.css +0 -1
  333. package/es/search/style/index.js +0 -3
  334. package/es/select/MultipleInput.js +0 -163
  335. package/es/select/Select.js +0 -775
  336. package/es/select/SelectDropdown.js +0 -341
  337. package/es/select/SelectInput.js +0 -31
  338. package/es/select/SingleInput.js +0 -94
  339. package/es/select/__tests__/index.test.js +0 -505
  340. package/es/select/common.js +0 -19
  341. package/es/select/index.d.ts +0 -65
  342. package/es/select/index.js +0 -32
  343. package/es/select/select-legacy/select-v1/Option.js +0 -81
  344. package/es/select/select-legacy/select-v1/Select.js +0 -706
  345. package/es/select/select-legacy/select-v1/SelectDropdown.js +0 -160
  346. package/es/select/select-legacy/select-v1/SelectInput.js +0 -308
  347. package/es/select/select-legacy/select-v1/common.js +0 -19
  348. package/es/select/select-legacy/select-v1/index.js +0 -16
  349. package/es/select/select-legacy/select-v2/Select.js +0 -756
  350. package/es/select/select-legacy/select-v2/SelectDropdown.js +0 -322
  351. package/es/select/select-legacy/select-v2/SelectInput.js +0 -331
  352. package/es/select/select-legacy/select-v2/__tests__/index.test.js +0 -505
  353. package/es/select/select-legacy/select-v2/common.js +0 -19
  354. package/es/select/select-legacy/select-v2/index.js +0 -15
  355. package/es/select/select-legacy/select-v2/style/index.css +0 -1
  356. package/es/select/select-legacy/select-v2/style/index.js +0 -9
  357. package/es/select/select-legacy/select-v2/style/select-dropdown.css +0 -1
  358. package/es/select/select-legacy/select-v2/style/select-input.css +0 -1
  359. package/es/select/style/index.css +0 -1
  360. package/es/select/style/index.js +0 -9
  361. package/es/select/style/select-dropdown.css +0 -1
  362. package/es/select/style/select-input.css +0 -1
  363. package/es/select/utils.js +0 -72
  364. package/es/select-tree/SelectTreeHook.js +0 -788
  365. package/es/select-tree/components/Trigger.js +0 -85
  366. package/es/select-tree/components/tree/LoadingIcon.js +0 -38
  367. package/es/select-tree/components/tree/NavTree.js +0 -229
  368. package/es/select-tree/components/tree/TreeNode.js +0 -167
  369. package/es/select-tree/components/tree/context.js +0 -15
  370. package/es/select-tree/components/tree/index.js +0 -80
  371. package/es/select-tree/components/tree/style/index.css +0 -1
  372. package/es/select-tree/components/tree/style/index.js +0 -3
  373. package/es/select-tree/components/tree/util.js +0 -621
  374. package/es/select-tree/index.d.ts +0 -47
  375. package/es/select-tree/index.js +0 -15
  376. package/es/select-tree/keyEvents.js +0 -121
  377. package/es/select-tree/style/index.css +0 -1
  378. package/es/select-tree/style/index.js +0 -3
  379. package/es/slider/index.d.ts +0 -22
  380. package/es/slider/index.js +0 -491
  381. package/es/slider/style/index.css +0 -1
  382. package/es/slider/style/index.js +0 -3
  383. package/es/stepper/Stepper.js +0 -158
  384. package/es/stepper/__tests__/index.test.js +0 -161
  385. package/es/stepper/index.d.ts +0 -16
  386. package/es/stepper/index.js +0 -33
  387. package/es/stepper/style/index.css +0 -1
  388. package/es/stepper/style/index.js +0 -3
  389. package/es/style/icon/diyIcon.css +0 -1
  390. package/es/style/icon/index.css +0 -1
  391. package/es/switch/__tests__/index.test.js +0 -68
  392. package/es/switch/index.d.ts +0 -13
  393. package/es/switch/index.js +0 -21
  394. package/es/switch/style/index.css +0 -1
  395. package/es/switch/style/index.js +0 -3
  396. package/es/switch/switch-legacy/__tests__/index.test.js +0 -68
  397. package/es/switch/switch-legacy/index.js +0 -128
  398. package/es/switch/switch-legacy/style/index.css +0 -1
  399. package/es/switch/switch-legacy/style/index.js +0 -3
  400. package/es/switch/switch.js +0 -76
  401. package/es/table/AdvanceHeader/CustomFilter.js +0 -73
  402. package/es/table/AdvanceHeader/Sorter.js +0 -72
  403. package/es/table/AdvanceHeader/index.js +0 -41
  404. package/es/table/AdvanceHeader/select/index.js +0 -720
  405. package/es/table/AdvanceHeader/select/style/index.css +0 -1
  406. package/es/table/AdvanceHeader/select/style/index.js +0 -5
  407. package/es/table/AdvanceHeader/style/index.css +0 -1
  408. package/es/table/AdvanceHeader/style/index.js +0 -3
  409. package/es/table/BodyTable.js +0 -261
  410. package/es/table/Cell.js +0 -193
  411. package/es/table/ColumnMenu.js +0 -148
  412. package/es/table/Expandcol.js +0 -48
  413. package/es/table/HeaderTable.js +0 -359
  414. package/es/table/Indent.js +0 -27
  415. package/es/table/LoadingIcon.js +0 -38
  416. package/es/table/Row.js +0 -261
  417. package/es/table/SettingMenu.js +0 -205
  418. package/es/table/Table.js +0 -697
  419. package/es/table/context.js +0 -15
  420. package/es/table/hooks/useClickOutside.js +0 -23
  421. package/es/table/index.d.ts +0 -108
  422. package/es/table/index.js +0 -21
  423. package/es/table/style/Table.css +0 -1
  424. package/es/table/style/index.css +0 -1
  425. package/es/table/style/index.js +0 -3
  426. package/es/table/style/reset.css +0 -1
  427. package/es/table/style/variable.css +0 -0
  428. package/es/table/table-legacy/table-v2/Body.js +0 -298
  429. package/es/table/table-legacy/table-v2/ClickOuterside.js +0 -99
  430. package/es/table/table-legacy/table-v2/Footer.js +0 -174
  431. package/es/table/table-legacy/table-v2/Header.js +0 -319
  432. package/es/table/table-legacy/table-v2/TableContent.js +0 -105
  433. package/es/table/table-legacy/table-v2/__tests__/index.test.js +0 -129
  434. package/es/table/table-legacy/table-v2/checkbox/index.js +0 -98
  435. package/es/table/table-legacy/table-v2/checkbox/style/index.css +0 -1
  436. package/es/table/table-legacy/table-v2/checkbox/style/index.js +0 -3
  437. package/es/table/table-legacy/table-v2/index.js +0 -1466
  438. package/es/table/table-legacy/table-v2/menu/index.js +0 -110
  439. package/es/table/table-legacy/table-v2/prefix.js +0 -20
  440. package/es/table/table-legacy/table-v2/style/Table.css +0 -1
  441. package/es/table/table-legacy/table-v2/style/index.css +0 -1
  442. package/es/table/table-legacy/table-v2/style/index.js +0 -3
  443. package/es/table/table-legacy/table-v2/tool.js +0 -129
  444. package/es/table/util.js +0 -320
  445. package/es/tabs/ItemDropdown.js +0 -158
  446. package/es/tabs/TabItem.js +0 -116
  447. package/es/tabs/TabPane.js +0 -64
  448. package/es/tabs/Tabs.js +0 -576
  449. package/es/tabs/__tests__/index.test.js +0 -333
  450. package/es/tabs/hooks/useTabItems.js +0 -77
  451. package/es/tabs/hooks/useTranslate.js +0 -71
  452. package/es/tabs/index.d.ts +0 -47
  453. package/es/tabs/index.js +0 -38
  454. package/es/tabs/style/animate.css +0 -1
  455. package/es/tabs/style/index.css +0 -1
  456. package/es/tabs/style/index.js +0 -3
  457. package/es/tabs/tabs-legacy/ItemDropdown.js +0 -166
  458. package/es/tabs/tabs-legacy/TabPane.js +0 -74
  459. package/es/tabs/tabs-legacy/Tabs.js +0 -295
  460. package/es/tabs/tabs-legacy/index.js +0 -18
  461. package/es/tabs/tabs-legacy/style/index.css +0 -1
  462. package/es/tabs/tabs-legacy/style/index.js +0 -3
  463. package/es/tag/TagGroup.js +0 -235
  464. package/es/tag/TagItem.js +0 -116
  465. package/es/tag/__tests__/index.test.js +0 -46
  466. package/es/tag/index.d.ts +0 -32
  467. package/es/tag/index.js +0 -18
  468. package/es/tag/style/index.css +0 -1
  469. package/es/tag/style/index.js +0 -3
  470. package/es/timeline/__tests__/index.test.js +0 -198
  471. package/es/timeline/index.d.ts +0 -18
  472. package/es/timeline/index.js +0 -264
  473. package/es/timeline/style/index.css +0 -1
  474. package/es/timeline/style/index.js +0 -3
  475. package/es/tooltip/__tests__/index.test.js +0 -170
  476. package/es/tooltip/index.d.ts +0 -19
  477. package/es/tooltip/index.js +0 -210
  478. package/es/tooltip/style/index.css +0 -1
  479. package/es/tooltip/style/index.js +0 -3
  480. package/es/transfer/Item.js +0 -192
  481. package/es/transfer/Transfer.js +0 -562
  482. package/es/transfer/__tests__/index.test.js +0 -210
  483. package/es/transfer/img/switch.png +0 -0
  484. package/es/transfer/img/warning.png +0 -0
  485. package/es/transfer/index.d.ts +0 -25
  486. package/es/transfer/index.js +0 -16
  487. package/es/transfer/style/index.css +0 -1
  488. package/es/transfer/style/index.js +0 -3
  489. package/es/tree/BaseTree.js +0 -209
  490. package/es/tree/IconLoading.js +0 -38
  491. package/es/tree/Switcher.js +0 -42
  492. package/es/tree/Tree.js +0 -610
  493. package/es/tree/TreeNode.js +0 -326
  494. package/es/tree/context.js +0 -15
  495. package/es/tree/customTreeNode.js +0 -140
  496. package/es/tree/hooks/useCheckable.js +0 -153
  497. package/es/tree/hooks/useClickOutside.js +0 -26
  498. package/es/tree/hooks/useExpand.js +0 -46
  499. package/es/tree/hooks/useFlatData.js +0 -61
  500. package/es/tree/hooks/useSelect.js +0 -47
  501. package/es/tree/index.d.ts +0 -67
  502. package/es/tree/index.js +0 -21
  503. package/es/tree/style/index.css +0 -1
  504. package/es/tree/style/index.js +0 -3
  505. package/es/tree/tree-legacy/tree-v1/Tree.js +0 -333
  506. package/es/tree/tree-legacy/tree-v1/TreeDivider.js +0 -25
  507. package/es/tree/tree-legacy/tree-v1/TreeItem.js +0 -329
  508. package/es/tree/tree-legacy/tree-v1/TreeNode.js +0 -715
  509. package/es/tree/tree-legacy/tree-v1/index.js +0 -13
  510. package/es/tree/tree-legacy/tree-v1/style/index.css +0 -1
  511. package/es/tree/tree-legacy/tree-v1/style/index.js +0 -3
  512. package/es/tree/tree-legacy/tree-v1/util.js +0 -434
  513. package/es/tree/tree-legacy/tree-v2/IconLoading.js +0 -38
  514. package/es/tree/tree-legacy/tree-v2/Modal.js +0 -71
  515. package/es/tree/tree-legacy/tree-v2/Tree.js +0 -347
  516. package/es/tree/tree-legacy/tree-v2/TreeDivider.js +0 -25
  517. package/es/tree/tree-legacy/tree-v2/TreeItem.js +0 -439
  518. package/es/tree/tree-legacy/tree-v2/TreeNode.js +0 -909
  519. package/es/tree/tree-legacy/tree-v2/__tests__/index.test.js +0 -603
  520. package/es/tree/tree-legacy/tree-v2/index.js +0 -20
  521. package/es/tree/tree-legacy/tree-v2/style/index.css +0 -1
  522. package/es/tree/tree-legacy/tree-v2/style/index.js +0 -3
  523. package/es/tree/tree-legacy/tree-v2/util.js +0 -195
  524. package/es/tree/util.js +0 -131
  525. package/es/upload/AvatarUpload.js +0 -293
  526. package/es/upload/DragUpload.js +0 -194
  527. package/es/upload/FileSelect.js +0 -47
  528. package/es/upload/NormalUpload.js +0 -146
  529. package/es/upload/PictureListUpload.js +0 -147
  530. package/es/upload/PictureUpload.js +0 -233
  531. package/es/upload/Preview.js +0 -441
  532. package/es/upload/__tests__/index.test.js +0 -760
  533. package/es/upload/hooks/useUpload.js +0 -274
  534. package/es/upload/index.d.ts +0 -42
  535. package/es/upload/index.js +0 -44
  536. package/es/upload/request.js +0 -118
  537. package/es/upload/style/index.css +0 -1
  538. package/es/upload/style/index.js +0 -5
  539. package/es/upload/style/preview.css +0 -1
  540. package/es/upload/style/preview.js +0 -3
  541. package/es/upload/util.js +0 -55
  542. package/es/watermark/index.d.ts +0 -12
  543. package/es/watermark/index.js +0 -110
  544. package/es/watermark/watermark.js +0 -252
package/es/index.d.ts DELETED
@@ -1,95 +0,0 @@
1
- /* eslint-disable import/export */
2
- export { default as Button } from './button'
3
- export * from './button'
4
- export { default as Card } from './card'
5
- export * from './card/index'
6
- export { default as Checkbox } from './checkbox'
7
- export * from './checkbox'
8
- export { default as Carousel } from './carousel'
9
- export * from './carousel'
10
- export { default as Cascader } from './cascader'
11
- export * from './cascader'
12
- export { default as Collapse } from './collapse'
13
- export * from './collapse'
14
- export { default as Badge } from './badge'
15
- export * from './badge'
16
- export { default as Counter } from './counter'
17
- export * from './counter'
18
- export { default as DatePicker } from './date-picker'
19
- export * from './date-picker'
20
- export { default as TimePicker } from './date-picker/TimePicker'
21
- export * from './date-picker/TimePicker'
22
- export { default as Dropdown } from './dropdown'
23
- export * from './dropdown'
24
- export { default as Form } from './form'
25
- export * from './form'
26
- export { default as Grid } from './grid'
27
- export * from './grid'
28
- export { default as Input } from './input'
29
- export * from './input'
30
- export { default as Loading } from './loading'
31
- export * from './loading'
32
- export { default as Menu } from './menu'
33
- export * from './menu'
34
- export { default as Message } from './message'
35
- export * from './message'
36
- export { default as Modal } from './modal'
37
- export * from './modal'
38
- export { default as Notification } from './notification'
39
- export * from './notification'
40
- export { default as Pagination } from './pagination'
41
- export * from './pagination'
42
- export { default as Popover } from './popover'
43
- export * from './popover'
44
- export { default as Progress } from './progress'
45
- export * from './progress'
46
- export { default as Radio } from './radio'
47
- export * from './radio'
48
- export { default as Rate } from './rate'
49
- export * from './rate'
50
- export { default as Select } from './select'
51
- export * from './select'
52
- export { default as Stepper } from './stepper'
53
- export * from './stepper'
54
- export { default as Switch } from './switch'
55
- export * from './switch'
56
- export { default as Table } from './table'
57
- export * from './table'
58
- export { default as Tabs } from './tabs'
59
- export * from './tabs'
60
- export { default as Tag } from './tag'
61
- export * from './tag'
62
- export { default as Timeline } from './timeline'
63
- export * from './timeline'
64
- export { default as Tooltip } from './tooltip'
65
- export * from './tooltip'
66
- export { default as Transfer } from './transfer'
67
- export * from './transfer'
68
- export { default as Tree } from './tree'
69
- export * from './tree'
70
- export { default as Upload } from './upload'
71
- export * from './upload'
72
- export { default as Watermark } from './watermark'
73
- export * from './watermark'
74
- export { default as List } from './list'
75
- export * from './list'
76
- export { default as SelectTree } from './select-tree'
77
- export * from './select-tree'
78
- export { default as Filter } from './filter'
79
- export * from './filter'
80
- export { default as Drawer } from './drawer'
81
- export * from './drawer'
82
- export { default as Search } from './search'
83
- export * from './search'
84
- export { default as Slider } from './slider'
85
- export * from './slider'
86
- export { default as Preview } from './preview'
87
- export * from './preview'
88
- export { default as Popper } from './popper'
89
- export * from './popper'
90
- export { default as Icon } from './icon'
91
- export * from './icon'
92
- export { default as Charts } from './charts'
93
- export * from './charts'
94
-
95
- export * from './context'
package/es/index.js DELETED
@@ -1,58 +0,0 @@
1
- export { default as Button } from './button'
2
- export { default as Dropdown } from './dropdown'
3
- export { default as Pagination } from './pagination'
4
- export { default as Tabs } from './tabs'
5
- export { default as Table } from './table'
6
- export { LegacyTable } from './table'
7
- export { default as Notification } from './notification'
8
- export { default as handleNotificate } from './notification/HandleNotification'
9
- export { default as Modal } from './modal'
10
- export { default as Drawer } from './drawer'
11
- export { default as Alert } from './alert'
12
- export { default as Collapse } from './collapse'
13
- export { default as Select } from './select'
14
- export { default as SelectTree } from './select-tree'
15
- export { default as Cascader } from './cascader'
16
- export { default as Tooltip } from './tooltip'
17
- export { default as Popover } from './popover'
18
- export { default as Popper } from './popper'
19
- export { default as Loading } from './loading'
20
- export { default as List } from './list'
21
- export { default as Upload } from './upload'
22
- export { default as Tree } from './tree'
23
- export { default as Input } from './input'
24
- export { default as DatePicker } from './date-picker'
25
- export { TimePicker } from './date-picker'
26
- export { default as Counter } from './counter'
27
- export { default as Badge } from './badge'
28
- export { default as Radio } from './radio'
29
- export { default as Checkbox } from './checkbox'
30
- export { default as Grid } from './grid'
31
- export { default as Layout } from './grid'
32
- export { default as Stepper } from './stepper'
33
-
34
- export { default as Form } from './form'
35
- export { LegacyForm } from './form'
36
-
37
- export { default as Menu } from './menu'
38
- export { default as FormItem } from './form/Item'
39
- export { default as Filter } from './filter'
40
- export { default as Ficon } from './ficon'
41
- export { default as Icon } from './icon'
42
- export { default as Progress } from './progress'
43
- export { default as Card } from './card'
44
- export { default as Timeline } from './timeline'
45
- export { default as Transfer } from './transfer'
46
- export { default as Switch } from './switch'
47
- export { default as Rate } from './rate'
48
- export { default as Message } from './message'
49
- export { default as Tag } from './tag'
50
- export { default as Breadcrumb } from './breadcrumb'
51
- export { default as Carousel } from './carousel'
52
- export { default as Watermark } from './watermark'
53
- export { default as Slider } from './slider'
54
- export { default as Search } from './search'
55
- export { default as Preview } from './preview'
56
-
57
- export { ThemeContext, LocaleContext } from './context'
58
- export { default as HiRequest } from './hi-request'
package/es/input/Input.js DELETED
@@ -1,420 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
4
-
5
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
-
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- exports["default"] = void 0;
11
-
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
15
-
16
- var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
17
-
18
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
19
-
20
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
21
-
22
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
23
-
24
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
25
-
26
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
27
-
28
- var _react = _interopRequireWildcard(require("react"));
29
-
30
- var _classnames = _interopRequireDefault(require("classnames"));
31
-
32
- var _util = require("./util");
33
-
34
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
35
-
36
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
37
-
38
- /**
39
- * 自定义属性全小写;原声属性驼峰法
40
- * @prop type 输入框类型
41
- */
42
- var Input = /*#__PURE__*/function (_Component) {
43
- (0, _inherits2["default"])(Input, _Component);
44
-
45
- var _super = _createSuper(Input);
46
-
47
- function Input(props) {
48
- var _this;
49
-
50
- (0, _classCallCheck2["default"])(this, Input);
51
- _this = _super.call(this, props);
52
- _this._Input = /*#__PURE__*/_react["default"].createRef();
53
- var prepend = props.prepend,
54
- append = props.append,
55
- value = props.value,
56
- defaultValue = props.defaultValue;
57
- var valueSource = value === undefined ? defaultValue : value;
58
- var type = (0, _typeof2["default"])(valueSource);
59
- var prefix = typeof prepend === 'string' ? prepend : '';
60
- var suffix = typeof append === 'string' ? append : '';
61
- var prependNode = typeof prepend !== 'string' && prepend;
62
- var appendNode = typeof append !== 'string' && append;
63
- _this.state = {
64
- value: _this.formatValueInit(type, valueSource),
65
- valueTrue: prefix + valueSource + suffix,
66
- hover: false,
67
- active: false,
68
- prefix: prefix,
69
- suffix: suffix,
70
- prepend: prependNode,
71
- append: appendNode
72
- };
73
- return _this;
74
- }
75
-
76
- (0, _createClass2["default"])(Input, [{
77
- key: "formatValueInit",
78
- value: function formatValueInit(type, valueSource) {
79
- var propsType = this.props.type;
80
- var val = type === 'string' || type === 'number' ? (0, _util.format)(valueSource.toString(), propsType) : '';
81
-
82
- if (propsType === 'amount' && val !== '') {
83
- val = (0, _util.formatAmount)(val);
84
- }
85
-
86
- return val;
87
- } // eslint-disable-next-line react/no-deprecated
88
-
89
- }, {
90
- key: "componentWillReceiveProps",
91
- value: function componentWillReceiveProps(nextProps) {
92
- if (nextProps.value !== undefined) {
93
- if (nextProps.value !== this.state.value) {
94
- var type = (0, _typeof2["default"])(nextProps.value);
95
- this.setState({
96
- value: type === 'string' || type === 'number' ? (0, _util.format)(nextProps.value.toString(), this.props.type) : '',
97
- valueTrue: nextProps.value
98
- });
99
- }
100
- }
101
-
102
- if (nextProps.prepend !== this.state.prepend || nextProps.append !== this.state.append) {
103
- var prepend = nextProps.prepend,
104
- append = nextProps.append;
105
- var prefix = typeof prepend === 'string' ? prepend : '';
106
- var suffix = typeof append === 'string' ? append : '';
107
- var prependNode = typeof prepend !== 'string' && prepend;
108
- var appendNode = typeof append !== 'string' && append;
109
- this.setState({
110
- prefix: prefix,
111
- suffix: suffix,
112
- prepend: prependNode,
113
- append: appendNode
114
- });
115
- }
116
- }
117
- }, {
118
- key: "focus",
119
- value: function focus() {
120
- this._Input.current.focus();
121
- }
122
- }, {
123
- key: "blur",
124
- value: function blur() {
125
- this._Input.current.blur();
126
- }
127
- /**
128
- * 渲染 text 输入框
129
- */
130
-
131
- }, {
132
- key: "renderText",
133
- value: function renderText() {
134
- var _this2 = this;
135
-
136
- var _this$state = this.state,
137
- hover = _this$state.hover,
138
- active = _this$state.active,
139
- value = _this$state.value; // clearableTrigger 为内部预留,主要表示清除按钮的触发形态,类型分为 'hover' 和 ‘always’
140
-
141
- var _this$props = this.props,
142
- disabled = _this$props.disabled,
143
- type = _this$props.type,
144
- id = _this$props.id,
145
- placeholder = _this$props.placeholder,
146
- clearable = _this$props.clearable,
147
- _this$props$clearable = _this$props.clearableTrigger,
148
- clearableTrigger = _this$props$clearable === void 0 ? 'hover' : _this$props$clearable,
149
- _this$props$bordered = _this$props.bordered,
150
- bordered = _this$props$bordered === void 0 ? true : _this$props$bordered;
151
- var _this$state2 = this.state,
152
- prefix = _this$state2.prefix,
153
- suffix = _this$state2.suffix,
154
- prepend = _this$state2.prepend,
155
- append = _this$state2.append;
156
- var noClear = ['textarea'];
157
- var prefixId = id ? id + '_prefix' : '';
158
- var suffixId = id ? id + '_suffix' : '';
159
- var _this$attrs = this.attrs,
160
- defaultValue = _this$attrs.defaultValue,
161
- attrs = (0, _objectWithoutProperties2["default"])(_this$attrs, ["defaultValue"]);
162
- var filterAttrs = (0, _util.filterObjProps)(attrs, ['locale', 'theme', 'suffixicon', 'suffix', 'prepend', 'prefixicon', 'prefix', 'localeDatas', 'append', 'innerRef', 'clearable', 'bordered']);
163
- return /*#__PURE__*/_react["default"].createElement("div", {
164
- className: (0, _classnames["default"])('hi-input__out', {
165
- 'hi-input--prepend': prepend,
166
- 'hi-input--append': append
167
- })
168
- }, // 前置元素
169
- prepend && /*#__PURE__*/_react["default"].createElement("span", {
170
- className: "hi-input__prepend"
171
- }, prepend), /*#__PURE__*/_react["default"].createElement("div", {
172
- className: (0, _classnames["default"])("hi-input__inner", {
173
- bordered: bordered,
174
- disabled: disabled,
175
- active: active
176
- })
177
- }, // 前缀
178
- prefix && /*#__PURE__*/_react["default"].createElement("span", {
179
- id: prefixId,
180
- className: "hi-input__prefix",
181
- "data-value": prefix
182
- }, prefix), /*#__PURE__*/_react["default"].createElement("input", (0, _extends2["default"])({
183
- ref: this._Input,
184
- className: "hi-input__text ".concat(disabled ? 'disabled' : ''),
185
- value: this.state.value,
186
- autoComplete: "off",
187
- disabled: disabled
188
- }, filterAttrs, {
189
- placeholder: placeholder,
190
- onChange: function onChange(e) {
191
- e.persist();
192
- var value = e.target.value;
193
- var valueTrue = (0, _util.formatValue)(value, type);
194
-
195
- if (prefix) {
196
- valueTrue = prefix + valueTrue;
197
- }
198
-
199
- if (suffix) {
200
- valueTrue = valueTrue + suffix;
201
- }
202
-
203
- value = (0, _util.format)(value, type); // 保证 onChange 拿到的是值是最新的 formatted value
204
-
205
- e.target.value = value;
206
- _this2.props.onChange && _this2.props.onChange(e, valueTrue);
207
- _this2.props.value === undefined && _this2.setState({
208
- value: value,
209
- valueTrue: valueTrue
210
- });
211
- },
212
- onBlur: function onBlur(e) {
213
- e.persist();
214
- var value = e.target.value;
215
- var valueTrue = _this2.state.valueTrue; // amount 自动添加小数
216
-
217
- if (_this2.props.type === 'amount' && value !== '') {
218
- value = (0, _util.formatAmount)(value);
219
- }
220
-
221
- _this2.setState({
222
- active: false,
223
- value: value
224
- }, function () {
225
- _this2.props.onBlur && _this2.props.onBlur(e, valueTrue);
226
- });
227
- },
228
- onFocus: function onFocus(e) {
229
- e.persist();
230
- var valueTrue = _this2.state.valueTrue;
231
-
232
- _this2.setState({
233
- active: true
234
- }, function () {
235
- _this2.props.onFocus && _this2.props.onFocus(e, valueTrue);
236
- });
237
- },
238
- onKeyDown: function onKeyDown(e) {
239
- var valueTrue = _this2.state.valueTrue;
240
- _this2.props.onKeyDown && _this2.props.onKeyDown(e, valueTrue);
241
- },
242
- onKeyUp: function onKeyUp(e) {
243
- var valueTrue = _this2.state.valueTrue;
244
- _this2.props.onKeyUp && _this2.props.onKeyUp(e, valueTrue);
245
- },
246
- onKeyPress: function onKeyPress(e) {
247
- var valueTrue = _this2.state.valueTrue;
248
- _this2.props.onKeyPress && _this2.props.onKeyPress(e, valueTrue);
249
- },
250
- onInput: function onInput(e) {
251
- var valueTrue = _this2.state.valueTrue;
252
- _this2.props.onInput && _this2.props.onInput(e, valueTrue);
253
- }
254
- })), // 清除
255
- noClear.indexOf(type) === -1 && prefix === '' && suffix === '' && value !== '' && clearable && /*#__PURE__*/_react["default"].createElement("span", {
256
- className: "hi-input__fix-box ".concat((hover || clearableTrigger === 'always') && !disabled ? '' : 'invisible'),
257
- onClick: function onClick() {
258
- _this2._Input.current.focus();
259
-
260
- var prefix = typeof _this2.props.prefix === 'undefined' ? '' : _this2.props.prefix;
261
- var suffix = typeof _this2.props.suffix === 'undefined' ? '' : _this2.props.suffix;
262
- var valueTrue = prefix + '' + suffix;
263
-
264
- _this2.setState({
265
- value: '',
266
- valueTrue: valueTrue
267
- }, function () {
268
- var e = {
269
- target: _this2._Input.current
270
- };
271
- _this2.props.onChange && _this2.props.onChange(e, '');
272
- });
273
- }
274
- }, /*#__PURE__*/_react["default"].createElement("i", {
275
- className: "hi-input__clear hi-input__suffix__icon hi-icon icon-close-circle"
276
- })), // 后缀
277
- suffix && /*#__PURE__*/_react["default"].createElement("span", {
278
- id: suffixId,
279
- className: "hi-input__suffix",
280
- "data-value": suffix
281
- }, suffix)), // 后置元素
282
- append && /*#__PURE__*/_react["default"].createElement("span", {
283
- className: "hi-input__append"
284
- }, append));
285
- }
286
- /**
287
- * 渲染 textarea
288
- */
289
-
290
- }, {
291
- key: "renderTextarea",
292
- value: function renderTextarea() {
293
- var _this3 = this;
294
-
295
- var active = this.state.active;
296
- var _this$props2 = this.props,
297
- disabled = _this$props2.disabled,
298
- theme = _this$props2.theme,
299
- className = _this$props2.className;
300
- var _this$attrs2 = this.attrs,
301
- defaultValue = _this$attrs2.defaultValue,
302
- attrs = (0, _objectWithoutProperties2["default"])(_this$attrs2, ["defaultValue"]);
303
- var filterAttrs = (0, _util.filterObjProps)(attrs, ['locale', 'theme', 'suffixicon', 'suffix', 'prepend', 'prefixicon', 'prefix', 'localeDatas', 'append', 'innerRef', 'clearable']);
304
- return /*#__PURE__*/_react["default"].createElement("textarea", (0, _extends2["default"])({
305
- className: "hi-input theme__".concat(theme, " ").concat(active ? 'active' : '', " ").concat(disabled ? 'disabled' : '', " ").concat(className || ''),
306
- style: this.props.style,
307
- autoComplete: "off",
308
- value: this.state.value,
309
- disabled: disabled
310
- }, filterAttrs, {
311
- onChange: function onChange(e) {
312
- e.persist();
313
- var valueTrue = e.target.value;
314
- _this3.props.onChange && _this3.props.onChange(e, valueTrue);
315
- _this3.props.value === undefined && _this3.setState({
316
- value: valueTrue,
317
- valueTrue: valueTrue
318
- });
319
- },
320
- onBlur: function onBlur(e) {
321
- e.persist();
322
- var valueTrue = e.target.value;
323
-
324
- _this3.setState({
325
- active: false
326
- }, function () {
327
- _this3.props.onBlur && _this3.props.onBlur(e, valueTrue);
328
- });
329
- },
330
- onFocus: function onFocus(e) {
331
- e.persist();
332
- var valueTrue = e.target.value;
333
-
334
- _this3.setState({
335
- active: true
336
- }, function () {
337
- _this3.props.onFocus && _this3.props.onFocus(e, valueTrue);
338
- });
339
- },
340
- onKeyDown: function onKeyDown(e) {
341
- var valueTrue = e.target.value;
342
- _this3.props.onKeyDown && _this3.props.onKeyDown(e, valueTrue);
343
- },
344
- onKeyUp: function onKeyUp(e) {
345
- var valueTrue = e.target.value;
346
- _this3.props.onKeyUp && _this3.props.onKeyUp(e, valueTrue);
347
- },
348
- onKeyPress: function onKeyPress(e) {
349
- var valueTrue = e.target.value;
350
- _this3.props.onKeyPress && _this3.props.onKeyPress(e, valueTrue);
351
- },
352
- onInput: function onInput(e) {
353
- var valueTrue = e.target.value;
354
- _this3.props.onInput && _this3.props.onInput(e, valueTrue);
355
- },
356
- onMouseOver: function onMouseOver(e) {
357
- _this3.setState({
358
- hover: true
359
- });
360
- },
361
- onMouseLeave: function onMouseLeave(e) {
362
- _this3.setState({
363
- hover: false
364
- });
365
- }
366
- }));
367
- }
368
- }, {
369
- key: "render",
370
- value: function render() {
371
- var _this4 = this;
372
-
373
- var type = this.attrs.type;
374
- var _this$props3 = this.props,
375
- size = _this$props3.size,
376
- id = _this$props3.id,
377
- className = _this$props3.className,
378
- required = _this$props3.required,
379
- theme = _this$props3.theme;
380
- return type === 'textarea' ? this.renderTextarea() : /*#__PURE__*/_react["default"].createElement("div", {
381
- id: id,
382
- className: "hi-input theme__".concat(theme, " ").concat(className || '', " ").concat(type).concat(size ? ' hi-input_' + size : '').concat(required ? ' required' : ''),
383
- style: this.props.style,
384
- "data-value": this.state.valueTrue,
385
- onMouseOver: function onMouseOver(e) {
386
- _this4.setState({
387
- hover: true
388
- });
389
- },
390
- onMouseLeave: function onMouseLeave(e) {
391
- _this4.setState({
392
- hover: false
393
- });
394
- }
395
- }, this.renderText());
396
- }
397
- }, {
398
- key: "attrs",
399
- get: function get() {
400
- // 传入属性
401
- var commonAttrs = {
402
- type: 'text',
403
- size: 'm',
404
- prefixicon: '',
405
- suffixicon: '',
406
- prefix: '',
407
- suffix: ''
408
- };
409
- var compactProps = Object.assign({}, commonAttrs, this.props);
410
- return (0, _util.getAttrs)(compactProps).attrs;
411
- }
412
- }]);
413
- return Input;
414
- }(_react.Component);
415
-
416
- Input.defaultProps = {
417
- defaultValue: ''
418
- };
419
- var _default = Input;
420
- exports["default"] = _default;