@kdcloudjs/kdesign 1.8.12 → 1.8.13

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 (408) hide show
  1. package/dist/kdesign.css +1 -1
  2. package/dist/kdesign.css.map +1 -1
  3. package/dist/kdesign.js +5 -3
  4. package/dist/kdesign.js.map +1 -1
  5. package/dist/kdesign.min.css +1 -1
  6. package/dist/kdesign.min.js +2 -2
  7. package/dist/kdesign.min.js.map +1 -1
  8. package/es/_utils/KeyCode.js +1 -333
  9. package/es/_utils/arrayUtil.js +0 -8
  10. package/es/_utils/formatUtil.js +9 -59
  11. package/es/_utils/getStringLength.js +0 -1
  12. package/es/_utils/hooks.js +2 -34
  13. package/es/_utils/index.js +1 -7
  14. package/es/_utils/numberUtil.js +0 -54
  15. package/es/_utils/raf.js +2 -2
  16. package/es/_utils/reactNode.js +1 -1
  17. package/es/_utils/resizeObserver.js +2 -4
  18. package/es/_utils/type.js +0 -1
  19. package/es/_utils/usePopper.js +3 -3
  20. package/es/alert/alert.js +8 -16
  21. package/es/anchor/anchor-link.js +3 -3
  22. package/es/anchor/anchor.js +23 -26
  23. package/es/anchor/context.js +1 -1
  24. package/es/avatar/avatar.js +8 -11
  25. package/es/badge/badge.js +7 -13
  26. package/es/base-data/base-data.js +34 -103
  27. package/es/breadcrumb/breadcrumb.js +12 -12
  28. package/es/breadcrumb/breadcrumbItem.js +5 -5
  29. package/es/button/button.js +13 -24
  30. package/es/button/group.js +13 -13
  31. package/es/card/card.js +12 -14
  32. package/es/carousel/carousel.js +13 -13
  33. package/es/carousel/displayList.js +3 -3
  34. package/es/carousel/fadeList.js +3 -3
  35. package/es/carousel/slideList.js +4 -4
  36. package/es/carousel/slidebar.js +3 -3
  37. package/es/cascader/cascader.js +31 -36
  38. package/es/checkbox/checkbox.js +25 -30
  39. package/es/checkbox/group.js +8 -9
  40. package/es/city-picker/city-picker.js +28 -38
  41. package/es/city-picker/interface.js +1 -1
  42. package/es/city-picker/option.js +4 -4
  43. package/es/clipboard/clipboard.js +5 -23
  44. package/es/clipboard/util.js +0 -60
  45. package/es/collapse/collapse.js +5 -5
  46. package/es/collapse/panel.js +15 -15
  47. package/es/color-picker/color-picker-panel.js +12 -13
  48. package/es/color-picker/color-picker.js +6 -10
  49. package/es/color-picker/utils/validateColor.js +0 -3
  50. package/es/config-provider/ConfigContext.js +1 -4
  51. package/es/config-provider/SizeContext.js +3 -3
  52. package/es/config-provider/compDefaultProps.js +3 -10
  53. package/es/config-provider/configProvider.js +1 -6
  54. package/es/config-provider/defaultConfig.js +0 -1
  55. package/es/date-picker/calendar.js +6 -23
  56. package/es/date-picker/context.js +1 -1
  57. package/es/date-picker/date-panel.js +12 -13
  58. package/es/date-picker/date-picker.js +7 -12
  59. package/es/date-picker/hooks/use-hover-value.js +0 -1
  60. package/es/date-picker/hooks/use-picker-input.js +0 -4
  61. package/es/date-picker/hooks/use-range-disabled.js +2 -6
  62. package/es/date-picker/hooks/use-range-view-dates.js +1 -9
  63. package/es/date-picker/hooks/use-text-value-mapping.js +0 -1
  64. package/es/date-picker/locale/zh_CN.js +0 -1
  65. package/es/date-picker/panel/date-time/date-time.js +4 -6
  66. package/es/date-picker/panel/header/header.js +14 -14
  67. package/es/date-picker/panel/month/month.js +5 -6
  68. package/es/date-picker/panel/quarter/quarter.js +4 -4
  69. package/es/date-picker/panel/time/time-column.js +4 -6
  70. package/es/date-picker/panel/time/time.js +10 -35
  71. package/es/date-picker/panel/week/week.js +5 -8
  72. package/es/date-picker/panel/year/year.js +4 -6
  73. package/es/date-picker/popper.js +3 -6
  74. package/es/date-picker/range/input-range.js +12 -13
  75. package/es/date-picker/range-picker.js +13 -36
  76. package/es/date-picker/single/input-date.js +8 -14
  77. package/es/date-picker/utils/date-fns.js +0 -35
  78. package/es/date-picker/utils/get-extra-footer.js +1 -1
  79. package/es/date-picker/utils/get-ranges.js +8 -8
  80. package/es/date-picker/utils/index.js +0 -3
  81. package/es/divider/divider.js +2 -2
  82. package/es/drawer/drawer.js +14 -39
  83. package/es/dropdown/dropdown.js +10 -11
  84. package/es/dropdown/menu.js +8 -12
  85. package/es/empty/defaultEmptyImg.js +18 -18
  86. package/es/empty/empty.js +9 -10
  87. package/es/empty/illustrationEmptyImg.js +106 -106
  88. package/es/filter/condition.js +10 -10
  89. package/es/filter/filter.js +17 -19
  90. package/es/filter/scheme.js +34 -41
  91. package/es/form/Field.js +5 -5
  92. package/es/form/FieldContext.js +1 -1
  93. package/es/form/FieldLabel.js +2 -2
  94. package/es/form/FieldWrapper.js +6 -6
  95. package/es/form/Form.js +2 -5
  96. package/es/form/FormContext.js +2 -4
  97. package/es/form/hooks/useForm.js +1 -14
  98. package/es/form/index.js +1 -1
  99. package/es/grid/col.js +1 -7
  100. package/es/grid/row.js +3 -9
  101. package/es/icon/icon.js +2 -2
  102. package/es/image/image.js +5 -7
  103. package/es/image/preview-group.js +3 -4
  104. package/es/image/preview.js +22 -24
  105. package/es/image-cropper/cropper.js +3 -6
  106. package/es/image-cropper/image-cropper.js +5 -5
  107. package/es/image-cropper/operation-bar.js +9 -9
  108. package/es/index.js +4 -0
  109. package/es/input/ClearableLabeledInput.js +13 -13
  110. package/es/input/TextArea.js +7 -7
  111. package/es/input/calculateNodeHeight.js +6 -11
  112. package/es/input/index.js +0 -1
  113. package/es/input/input.js +5 -5
  114. package/es/input-number/inputNumber.js +3 -10
  115. package/es/layout/layout.js +5 -9
  116. package/es/layout/sider.js +11 -14
  117. package/es/link/link.js +8 -12
  118. package/es/locale/locale.js +4 -34
  119. package/es/menu/menu.js +3 -4
  120. package/es/menu/menuItem.js +8 -13
  121. package/es/menu/subMenu.js +19 -27
  122. package/es/menu/util.js +0 -4
  123. package/es/message/content.js +13 -13
  124. package/es/message/index.js +1 -3
  125. package/es/modal/confirm.js +1 -1
  126. package/es/modal/modal.js +32 -40
  127. package/es/notification/content.js +18 -18
  128. package/es/notification/index.js +1 -1
  129. package/es/notification-base/index.js +1 -1
  130. package/es/notification-base/notice.js +2 -2
  131. package/es/notification-base/notification.js +3 -3
  132. package/es/pagination/pagination.js +48 -70
  133. package/es/popconfirm/popconfirm.js +8 -10
  134. package/es/popper/index.d.ts +2 -0
  135. package/es/popper/index.js +9 -15
  136. package/es/progress/circle.js +6 -8
  137. package/es/progress/line.js +3 -3
  138. package/es/progress/progress.js +11 -11
  139. package/es/qr-code/qr-code.js +6 -6
  140. package/es/radio/context.js +1 -1
  141. package/es/radio/group.js +9 -13
  142. package/es/radio/radio-button.js +2 -2
  143. package/es/radio/radio.js +19 -24
  144. package/es/rate/rate.js +11 -61
  145. package/es/search/option.js +4 -5
  146. package/es/search/quick-search.js +36 -57
  147. package/es/search/search-panel.js +56 -60
  148. package/es/search/search.js +9 -10
  149. package/es/select/interface.js +1 -1
  150. package/es/select/option.js +4 -4
  151. package/es/select/select.js +47 -87
  152. package/es/signature/drawingBoard.js +16 -16
  153. package/es/signature/signature.js +20 -20
  154. package/es/signature/utils/signature_pad.js +4 -12
  155. package/es/slider/marks.js +3 -5
  156. package/es/slider/slider.js +11 -32
  157. package/es/slider/sliderTooltip.js +3 -3
  158. package/es/slider/steps.js +2 -2
  159. package/es/slider/track.js +1 -1
  160. package/es/space/space.js +3 -5
  161. package/es/spin/spin.js +16 -18
  162. package/es/split-panel/split-panel.js +7 -18
  163. package/es/split-panel/trigger.js +6 -6
  164. package/es/stepper/stepper.js +11 -12
  165. package/es/steps/Step.js +8 -8
  166. package/es/steps/Steps.js +5 -5
  167. package/es/switch/switch.js +4 -6
  168. package/es/table/api.js +5 -22
  169. package/es/table/table.js +4 -15
  170. package/es/tabs/active-line.js +2 -6
  171. package/es/tabs/arrow-button.js +3 -3
  172. package/es/tabs/context.js +1 -1
  173. package/es/tabs/index.js +0 -1
  174. package/es/tabs/tab-pane.js +6 -6
  175. package/es/tabs/tabs.js +31 -34
  176. package/es/tag/tag.js +7 -15
  177. package/es/timeline/Timeline.js +5 -5
  178. package/es/timeline/TimelineItem.js +5 -5
  179. package/es/tooltip/tooltip.js +2 -2
  180. package/es/transfer/list-body.js +4 -4
  181. package/es/transfer/list-item.js +5 -6
  182. package/es/transfer/list.js +18 -22
  183. package/es/transfer/operation.js +7 -7
  184. package/es/transfer/search.js +5 -5
  185. package/es/transfer/transfer.js +8 -13
  186. package/es/tree/tree.js +9 -9
  187. package/es/tree/treeNode.js +18 -20
  188. package/es/tree/utils/treeUtils.js +1 -27
  189. package/es/tree-select/interface.js +1 -1
  190. package/es/tree-select/tree-select.js +35 -48
  191. package/es/typography/base.js +5 -5
  192. package/es/typography/index.js +0 -1
  193. package/es/typography/paragraph.js +1 -1
  194. package/es/typography/text.js +1 -1
  195. package/es/typography/title.js +1 -1
  196. package/es/typography/typography.js +4 -8
  197. package/es/upload/dragger.js +2 -2
  198. package/es/upload/request.js +0 -5
  199. package/es/upload/scan-files.js +0 -1
  200. package/es/upload/upload.js +34 -34
  201. package/es/upload/verify-file.js +0 -1
  202. package/es/view-container/context.js +1 -1
  203. package/es/view-container/view-container.js +4 -8
  204. package/es/virtual-list/Filler.js +2 -2
  205. package/es/virtual-list/utils/algorithmUtil.js +0 -13
  206. package/es/virtual-list/utils/itemUtil.js +0 -30
  207. package/es/virtual-list/virtual-list.js +8 -11
  208. package/lib/_utils/KeyCode.js +1 -333
  209. package/lib/_utils/arrayUtil.js +0 -8
  210. package/lib/_utils/formatUtil.js +9 -59
  211. package/lib/_utils/getStringLength.js +0 -1
  212. package/lib/_utils/hooks.js +2 -34
  213. package/lib/_utils/index.js +0 -7
  214. package/lib/_utils/numberUtil.js +0 -54
  215. package/lib/_utils/raf.js +2 -2
  216. package/lib/_utils/reactNode.js +1 -1
  217. package/lib/_utils/resizeObserver.js +2 -4
  218. package/lib/_utils/type.js +0 -1
  219. package/lib/_utils/usePopper.js +3 -3
  220. package/lib/alert/alert.js +8 -16
  221. package/lib/anchor/anchor-link.js +3 -3
  222. package/lib/anchor/anchor.js +23 -26
  223. package/lib/anchor/context.js +1 -1
  224. package/lib/avatar/avatar.js +8 -11
  225. package/lib/badge/badge.js +7 -13
  226. package/lib/base-data/base-data.js +34 -103
  227. package/lib/breadcrumb/breadcrumb.js +12 -12
  228. package/lib/breadcrumb/breadcrumbItem.js +5 -5
  229. package/lib/button/button.js +13 -24
  230. package/lib/button/group.js +13 -13
  231. package/lib/card/card.js +12 -14
  232. package/lib/carousel/carousel.js +13 -13
  233. package/lib/carousel/displayList.js +3 -3
  234. package/lib/carousel/fadeList.js +3 -3
  235. package/lib/carousel/slideList.js +4 -4
  236. package/lib/carousel/slidebar.js +3 -3
  237. package/lib/cascader/cascader.js +31 -36
  238. package/lib/checkbox/checkbox.js +25 -30
  239. package/lib/checkbox/group.js +8 -8
  240. package/lib/city-picker/city-picker.js +28 -38
  241. package/lib/city-picker/interface.js +1 -1
  242. package/lib/city-picker/option.js +4 -4
  243. package/lib/clipboard/clipboard.js +5 -23
  244. package/lib/clipboard/util.js +0 -60
  245. package/lib/collapse/collapse.js +5 -5
  246. package/lib/collapse/panel.js +15 -15
  247. package/lib/color-picker/color-picker-panel.js +12 -14
  248. package/lib/color-picker/color-picker.js +6 -10
  249. package/lib/color-picker/utils/validateColor.js +0 -3
  250. package/lib/config-provider/ConfigContext.js +1 -5
  251. package/lib/config-provider/SizeContext.js +3 -3
  252. package/lib/config-provider/compDefaultProps.js +3 -10
  253. package/lib/config-provider/configProvider.js +1 -7
  254. package/lib/config-provider/defaultConfig.js +0 -1
  255. package/lib/date-picker/calendar.js +6 -23
  256. package/lib/date-picker/context.js +1 -1
  257. package/lib/date-picker/date-panel.js +12 -13
  258. package/lib/date-picker/date-picker.js +7 -12
  259. package/lib/date-picker/hooks/use-hover-value.js +0 -1
  260. package/lib/date-picker/hooks/use-picker-input.js +0 -4
  261. package/lib/date-picker/hooks/use-range-disabled.js +2 -6
  262. package/lib/date-picker/hooks/use-range-view-dates.js +1 -9
  263. package/lib/date-picker/hooks/use-text-value-mapping.js +0 -1
  264. package/lib/date-picker/locale/zh_CN.js +0 -1
  265. package/lib/date-picker/panel/date-time/date-time.js +4 -6
  266. package/lib/date-picker/panel/header/header.js +14 -14
  267. package/lib/date-picker/panel/month/month.js +5 -6
  268. package/lib/date-picker/panel/quarter/quarter.js +4 -4
  269. package/lib/date-picker/panel/time/time-column.js +4 -6
  270. package/lib/date-picker/panel/time/time.js +10 -35
  271. package/lib/date-picker/panel/week/week.js +5 -8
  272. package/lib/date-picker/panel/year/year.js +4 -6
  273. package/lib/date-picker/popper.js +3 -6
  274. package/lib/date-picker/range/input-range.js +12 -13
  275. package/lib/date-picker/range-picker.js +13 -36
  276. package/lib/date-picker/single/input-date.js +8 -14
  277. package/lib/date-picker/utils/date-fns.js +0 -34
  278. package/lib/date-picker/utils/get-extra-footer.js +1 -1
  279. package/lib/date-picker/utils/get-ranges.js +8 -8
  280. package/lib/date-picker/utils/index.js +0 -3
  281. package/lib/divider/divider.js +2 -2
  282. package/lib/drawer/drawer.js +14 -40
  283. package/lib/dropdown/dropdown.js +10 -11
  284. package/lib/dropdown/menu.js +8 -12
  285. package/lib/empty/defaultEmptyImg.js +18 -18
  286. package/lib/empty/empty.js +9 -10
  287. package/lib/empty/illustrationEmptyImg.js +106 -106
  288. package/lib/filter/condition.js +10 -10
  289. package/lib/filter/filter.js +17 -19
  290. package/lib/filter/scheme.js +34 -41
  291. package/lib/form/Field.js +5 -5
  292. package/lib/form/FieldContext.js +1 -1
  293. package/lib/form/FieldLabel.js +2 -2
  294. package/lib/form/FieldWrapper.js +6 -6
  295. package/lib/form/Form.js +2 -5
  296. package/lib/form/FormContext.js +2 -4
  297. package/lib/form/hooks/useForm.js +1 -14
  298. package/lib/form/index.js +1 -1
  299. package/lib/grid/col.js +1 -7
  300. package/lib/grid/row.js +3 -9
  301. package/lib/icon/icon.js +2 -2
  302. package/lib/image/image.js +5 -7
  303. package/lib/image/preview-group.js +3 -4
  304. package/lib/image/preview.js +22 -24
  305. package/lib/image-cropper/cropper.js +3 -6
  306. package/lib/image-cropper/image-cropper.js +5 -5
  307. package/lib/image-cropper/operation-bar.js +9 -9
  308. package/lib/index.js +2 -8
  309. package/lib/input/ClearableLabeledInput.js +13 -13
  310. package/lib/input/TextArea.js +7 -7
  311. package/lib/input/calculateNodeHeight.js +6 -11
  312. package/lib/input/index.js +0 -1
  313. package/lib/input/input.js +5 -5
  314. package/lib/input-number/inputNumber.js +3 -10
  315. package/lib/layout/layout.js +5 -9
  316. package/lib/layout/sider.js +11 -14
  317. package/lib/link/link.js +8 -12
  318. package/lib/locale/locale.js +4 -34
  319. package/lib/menu/menu.js +3 -4
  320. package/lib/menu/menuItem.js +8 -13
  321. package/lib/menu/subMenu.js +19 -27
  322. package/lib/menu/util.js +0 -4
  323. package/lib/message/content.js +13 -13
  324. package/lib/message/index.js +1 -3
  325. package/lib/modal/confirm.js +1 -1
  326. package/lib/modal/modal.js +32 -40
  327. package/lib/notification/content.js +18 -18
  328. package/lib/notification/index.js +1 -1
  329. package/lib/notification-base/index.js +1 -1
  330. package/lib/notification-base/notice.js +2 -2
  331. package/lib/notification-base/notification.js +3 -3
  332. package/lib/pagination/pagination.js +48 -70
  333. package/lib/popconfirm/popconfirm.js +8 -10
  334. package/lib/popper/index.d.ts +2 -0
  335. package/lib/popper/index.js +9 -15
  336. package/lib/progress/circle.js +6 -8
  337. package/lib/progress/line.js +3 -3
  338. package/lib/progress/progress.js +11 -11
  339. package/lib/qr-code/qr-code.js +6 -6
  340. package/lib/radio/context.js +1 -1
  341. package/lib/radio/group.js +9 -13
  342. package/lib/radio/radio-button.js +2 -2
  343. package/lib/radio/radio.js +19 -24
  344. package/lib/rate/rate.js +11 -61
  345. package/lib/search/option.js +4 -5
  346. package/lib/search/quick-search.js +36 -57
  347. package/lib/search/search-panel.js +56 -60
  348. package/lib/search/search.js +9 -10
  349. package/lib/select/interface.js +1 -1
  350. package/lib/select/option.js +4 -4
  351. package/lib/select/select.js +47 -87
  352. package/lib/signature/drawingBoard.js +16 -16
  353. package/lib/signature/signature.js +20 -20
  354. package/lib/signature/utils/signature_pad.js +4 -12
  355. package/lib/slider/marks.js +3 -5
  356. package/lib/slider/slider.js +11 -32
  357. package/lib/slider/sliderTooltip.js +3 -3
  358. package/lib/slider/steps.js +2 -2
  359. package/lib/slider/track.js +1 -1
  360. package/lib/space/space.js +3 -5
  361. package/lib/spin/spin.js +16 -18
  362. package/lib/split-panel/split-panel.js +7 -18
  363. package/lib/split-panel/trigger.js +6 -6
  364. package/lib/stepper/stepper.js +11 -12
  365. package/lib/steps/Step.js +8 -8
  366. package/lib/steps/Steps.js +5 -5
  367. package/lib/switch/switch.js +4 -6
  368. package/lib/table/api.js +5 -22
  369. package/lib/table/table.js +4 -15
  370. package/lib/tabs/active-line.js +2 -6
  371. package/lib/tabs/arrow-button.js +3 -3
  372. package/lib/tabs/context.js +1 -1
  373. package/lib/tabs/index.js +0 -1
  374. package/lib/tabs/tab-pane.js +6 -6
  375. package/lib/tabs/tabs.js +31 -34
  376. package/lib/tag/tag.js +7 -15
  377. package/lib/timeline/Timeline.js +5 -5
  378. package/lib/timeline/TimelineItem.js +5 -5
  379. package/lib/tooltip/tooltip.js +2 -2
  380. package/lib/transfer/list-body.js +4 -4
  381. package/lib/transfer/list-item.js +5 -6
  382. package/lib/transfer/list.js +18 -22
  383. package/lib/transfer/operation.js +7 -7
  384. package/lib/transfer/search.js +5 -5
  385. package/lib/transfer/transfer.js +8 -13
  386. package/lib/tree/tree.js +9 -9
  387. package/lib/tree/treeNode.js +18 -20
  388. package/lib/tree/utils/treeUtils.js +1 -27
  389. package/lib/tree-select/interface.js +1 -1
  390. package/lib/tree-select/tree-select.js +35 -48
  391. package/lib/typography/base.js +5 -5
  392. package/lib/typography/index.js +0 -1
  393. package/lib/typography/paragraph.js +1 -1
  394. package/lib/typography/text.js +1 -1
  395. package/lib/typography/title.js +1 -1
  396. package/lib/typography/typography.js +4 -8
  397. package/lib/upload/dragger.js +2 -2
  398. package/lib/upload/request.js +0 -5
  399. package/lib/upload/scan-files.js +0 -1
  400. package/lib/upload/upload.js +34 -34
  401. package/lib/upload/verify-file.js +0 -1
  402. package/lib/view-container/context.js +1 -1
  403. package/lib/view-container/view-container.js +4 -8
  404. package/lib/virtual-list/Filler.js +2 -2
  405. package/lib/virtual-list/utils/algorithmUtil.js +0 -13
  406. package/lib/virtual-list/utils/itemUtil.js +0 -30
  407. package/lib/virtual-list/virtual-list.js +8 -12
  408. package/package.json +1 -3
@@ -60,25 +60,25 @@ var QRCode = function QRCode(props) {
60
60
  fgColor: color,
61
61
  imageSettings: icon ? imageSettings : undefined
62
62
  };
63
- return /*#__PURE__*/React.createElement("div", {
63
+ return React.createElement("div", {
64
64
  className: qrCodeClass,
65
65
  style: _extends(_extends({}, style), {
66
66
  width: "".concat(containerSize, "px"),
67
67
  height: "".concat(containerSize, "px"),
68
68
  backgroundColor: bgColor
69
69
  })
70
- }, status !== 'active' && /*#__PURE__*/React.createElement("div", {
70
+ }, status !== 'active' && React.createElement("div", {
71
71
  className: "".concat(qrCodePrefixCls, "-mask")
72
- }, status === 'loading' && /*#__PURE__*/React.createElement(Spin, null), status === 'expired' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", {
72
+ }, status === 'loading' && React.createElement(Spin, null), status === 'expired' && React.createElement(React.Fragment, null, React.createElement("p", {
73
73
  className: "".concat(qrCodePrefixCls, "-expired")
74
- }, qrCodeLangMsg.qrCodeExpired), onRefresh && /*#__PURE__*/React.createElement(Button, {
75
- icon: /*#__PURE__*/React.createElement(Icon, {
74
+ }, qrCodeLangMsg.qrCodeExpired), onRefresh && React.createElement(Button, {
75
+ icon: React.createElement(Icon, {
76
76
  type: "refresh"
77
77
  }),
78
78
  type: "text",
79
79
  onClick: onRefresh,
80
80
  size: "middle"
81
- }, qrCodeLangMsg.clickRefresh))), type === 'canvas' ? /*#__PURE__*/React.createElement(QRCodeCanvas, _extends({}, codeProps)) : /*#__PURE__*/React.createElement(QRCodeSVG, _extends({}, codeProps)));
81
+ }, qrCodeLangMsg.clickRefresh))), type === 'canvas' ? React.createElement(QRCodeCanvas, _extends({}, codeProps)) : React.createElement(QRCodeSVG, _extends({}, codeProps)));
82
82
  };
83
83
  QRCode.displayName = 'QRCode';
84
84
  export default QRCode;
@@ -1,4 +1,4 @@
1
1
  import * as React from 'react';
2
- var RadioGroupContext = /*#__PURE__*/React.createContext(null);
2
+ var RadioGroupContext = React.createContext(null);
3
3
  export var RadioGroupContextProvider = RadioGroupContext.Provider;
4
4
  export default RadioGroupContext;
package/es/radio/group.js CHANGED
@@ -7,7 +7,7 @@ import ConfigContext from '../config-provider/ConfigContext';
7
7
  import { getCompProps } from '../_utils';
8
8
  import Radio from './radio';
9
9
  import { RadioGroupContextProvider } from './context';
10
- var RadioGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
10
+ var RadioGroup = React.forwardRef(function (props, ref) {
11
11
  var _React$useContext = React.useContext(ConfigContext),
12
12
  getPrefixCls = _React$useContext.getPrefixCls,
13
13
  prefixCls = _React$useContext.prefixCls,
@@ -17,7 +17,6 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
17
17
  _React$useState2 = _slicedToArray(_React$useState, 2),
18
18
  value = _React$useState2[0],
19
19
  setValue = _React$useState2[1];
20
- // 从props更新value值
21
20
  React.useEffect(function () {
22
21
  if (typeof props.value !== 'undefined') {
23
22
  setValue(props.value);
@@ -42,18 +41,16 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
42
41
  children = _getCompProps.children,
43
42
  className = _getCompProps.className,
44
43
  optionType = _getCompProps.optionType,
45
- customPrefixcls = _getCompProps.prefixCls; // 属性需要合并一遍用户定义的默认属性
46
- var groupPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, "radio-group", customPrefixcls); // 单选组样式前缀
47
- var radioPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, "radio", customPrefixcls); // 单选样式前缀
44
+ customPrefixcls = _getCompProps.prefixCls;
45
+ var groupPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, "radio-group", customPrefixcls);
46
+ var radioPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, "radio", customPrefixcls);
48
47
  var childrenToRender = children;
49
- // 如果存在 options, 优先使用
50
48
  if (options && options.length > 0) {
51
49
  var _context;
52
50
  var optionsPrefixCls = optionType === undefined ? radioPrefixCls : _concatInstanceProperty(_context = "".concat(radioPrefixCls, "-")).call(_context, optionType);
53
51
  childrenToRender = _mapInstanceProperty(options).call(options, function (option) {
54
52
  if (typeof option === 'string') {
55
- // 此处类型自动推导为 string
56
- return /*#__PURE__*/React.createElement(Radio, {
53
+ return React.createElement(Radio, {
57
54
  key: option,
58
55
  prefixCls: optionsPrefixCls,
59
56
  disabled: disabled,
@@ -61,8 +58,7 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
61
58
  checked: value === option
62
59
  }, option);
63
60
  }
64
- // 此处类型自动推导为 { label: string value: string }
65
- return /*#__PURE__*/React.createElement(Radio, {
61
+ return React.createElement(Radio, {
66
62
  key: "radio-group-value-options-".concat(option.value),
67
63
  prefixCls: optionsPrefixCls,
68
64
  disabled: option.disabled || disabled,
@@ -72,14 +68,14 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
72
68
  }, option.label);
73
69
  });
74
70
  }
75
- return /*#__PURE__*/React.createElement("div", {
71
+ return React.createElement("div", {
76
72
  className: classNames(groupPrefixCls, className),
77
73
  style: style,
78
74
  id: id,
79
75
  ref: ref
80
76
  }, childrenToRender);
81
77
  };
82
- return /*#__PURE__*/React.createElement(RadioGroupContextProvider, {
78
+ return React.createElement(RadioGroupContextProvider, {
83
79
  value: {
84
80
  value: value,
85
81
  name: props.name,
@@ -88,4 +84,4 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
88
84
  }
89
85
  }, renderGroup());
90
86
  });
91
- export default /*#__PURE__*/React.memo(RadioGroup);
87
+ export default React.memo(RadioGroup);
@@ -32,7 +32,7 @@ var RadioButton = function RadioButton(props, ref) {
32
32
  radioProps.checked = props.value === radioGroupContext.value;
33
33
  radioProps.disabled = props.disabled || radioGroupContext.disabled;
34
34
  }
35
- return /*#__PURE__*/React.createElement(Radio, _extends({
35
+ return React.createElement(Radio, _extends({
36
36
  title: title,
37
37
  prefixCls: radioButtonPrefixCls
38
38
  }, radioProps, {
@@ -40,4 +40,4 @@ var RadioButton = function RadioButton(props, ref) {
40
40
  ref: ref
41
41
  }), children);
42
42
  };
43
- export default /*#__PURE__*/React.forwardRef(RadioButton);
43
+ export default React.forwardRef(RadioButton);
package/es/radio/radio.js CHANGED
@@ -38,7 +38,7 @@ var InternalRadio = function InternalRadio(props, ref) {
38
38
  disabled = _a.disabled,
39
39
  defaultChecked = _a.defaultChecked,
40
40
  customPrefixcls = _a.prefixCls,
41
- restProps = __rest(_a, ["style", "checked", "children", "className", "radioType", "value", "disabled", "defaultChecked", "prefixCls"]); // 属性需要合并一遍用户定义的默认属性
41
+ restProps = __rest(_a, ["style", "checked", "children", "className", "radioType", "value", "disabled", "defaultChecked", "prefixCls"]);
42
42
  devWarning(!(isNumber(value) || isString(value)) && value !== '', 'radio', 'radio `value` type must string or number ');
43
43
  devWarning(value === '', 'radio', 'radio value type is not empty string ');
44
44
  var mergedDisabled = (context === null || context === void 0 ? void 0 : context.disabled) || restProps.disabled;
@@ -46,7 +46,7 @@ var InternalRadio = function InternalRadio(props, ref) {
46
46
  var getPrefix = function getPrefix(radioType) {
47
47
  return "radio".concat(radioType === 'square' ? "-".concat(radioType) : '');
48
48
  };
49
- var radioPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, getPrefix(radioType), customPrefixcls); // 样式前缀
49
+ var radioPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, getPrefix(radioType), customPrefixcls);
50
50
  var _React$useState = React.useState(initValue),
51
51
  _React$useState2 = _slicedToArray(_React$useState, 2),
52
52
  isChecked = _React$useState2[0],
@@ -67,7 +67,7 @@ var InternalRadio = function InternalRadio(props, ref) {
67
67
  context.onChange(e, value);
68
68
  }
69
69
  };
70
- var classString = classNames((_classNames = {}, _defineProperty(_classNames, "".concat(radioPrefixCls), true), _defineProperty(_classNames, "".concat(radioPrefixCls, "-disabled"), disabled), _defineProperty(_classNames, "".concat(radioPrefixCls, "-checked"), isChecked), _classNames), className); // 单选包裹元素class名称
70
+ var classString = classNames((_classNames = {}, _defineProperty(_classNames, "".concat(radioPrefixCls), true), _defineProperty(_classNames, "".concat(radioPrefixCls, "-disabled"), disabled), _defineProperty(_classNames, "".concat(radioPrefixCls, "-checked"), isChecked), _classNames), className);
71
71
  useEffect(function () {
72
72
  var _a;
73
73
  var handleRepeatClick = function handleRepeatClick(e) {
@@ -80,30 +80,25 @@ var InternalRadio = function InternalRadio(props, ref) {
80
80
  (_a = radioRef === null || radioRef === void 0 ? void 0 : radioRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('click', handleRepeatClick);
81
81
  return function () {
82
82
  var _a;
83
- // eslint-disable-next-line react-hooks/exhaustive-deps
84
83
  (_a = radioRef === null || radioRef === void 0 ? void 0 : radioRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('click', handleRepeatClick);
85
84
  };
86
85
  }, []);
87
- return (
88
- /*#__PURE__*/
89
- // eslint-disable-next-line
90
- React.createElement("label", {
91
- className: classString,
92
- style: style,
93
- ref: mergedRef
94
- }, /*#__PURE__*/React.createElement("input", _extends({}, restProps, {
95
- type: "radio",
96
- className: "".concat(radioPrefixCls, "-input"),
97
- checked: isChecked,
98
- onChange: onChange,
99
- value: value,
100
- name: context === null || context === void 0 ? void 0 : context.name,
101
- disabled: mergedDisabled
102
- })), children !== undefined ? /*#__PURE__*/React.createElement("span", {
103
- className: "".concat(radioPrefixCls, "-text")
104
- }, children) : null)
105
- );
86
+ return React.createElement("label", {
87
+ className: classString,
88
+ style: style,
89
+ ref: mergedRef
90
+ }, React.createElement("input", _extends({}, restProps, {
91
+ type: "radio",
92
+ className: "".concat(radioPrefixCls, "-input"),
93
+ checked: isChecked,
94
+ onChange: onChange,
95
+ value: value,
96
+ name: context === null || context === void 0 ? void 0 : context.name,
97
+ disabled: mergedDisabled
98
+ })), children !== undefined ? React.createElement("span", {
99
+ className: "".concat(radioPrefixCls, "-text")
100
+ }, children) : null);
106
101
  };
107
- var Radio = /*#__PURE__*/React.forwardRef(InternalRadio);
102
+ var Radio = React.forwardRef(InternalRadio);
108
103
  Radio.displayName = 'Radio';
109
104
  export default Radio;
package/es/rate/rate.js CHANGED
@@ -34,24 +34,20 @@ var Rate = function Rate(props) {
34
34
  onHoverChange = _getCompProps.onHoverChange,
35
35
  onFocus = _getCompProps.onFocus;
36
36
  devWarning(SizeTypes.indexOf(size) === -1, 'Rate', "cannot found SizeType '".concat(size, "'"));
37
- // className前缀
38
37
  var prefixCls = getPrefixCls(pkgPrefixCls, 'rate', customPrefixcls);
39
38
  var _React$useState = React.useState(defaultValue),
40
39
  _React$useState2 = _slicedToArray(_React$useState, 2),
41
40
  selectedValue = _React$useState2[0],
42
- setSelectedValue = _React$useState2[1]; // 当前选中的值,包含一位小数
41
+ setSelectedValue = _React$useState2[1];
43
42
  var _React$useState3 = React.useState(0),
44
43
  _React$useState4 = _slicedToArray(_React$useState3, 2),
45
44
  activeNumber = _React$useState4[0],
46
- setActiveNumber = _React$useState4[1]; // 鼠标悬停icon位置对应的值
45
+ setActiveNumber = _React$useState4[1];
47
46
  React.useEffect(function () {
48
47
  if (value !== undefined && value !== selectedValue) {
49
48
  setSelectedValue(value);
50
49
  }
51
50
  }, [value, selectedValue]);
52
- // const shouldSetValue = (value: number) => {
53
- // return value && value !== 0 && value !== selectedValue
54
- // }
55
51
  var handleClick = React.useCallback(function (value) {
56
52
  setSelectedValue(value);
57
53
  onChange && onChange(value);
@@ -69,31 +65,19 @@ var Rate = function Rate(props) {
69
65
  var handleBlur = React.useCallback(function () {
70
66
  onBlur && onBlur();
71
67
  }, [onBlur]);
72
- /**
73
- *获取图标
74
- * @param icon
75
- * @param index
76
- */
77
68
  var getIcon = function getIcon(icon, activeIcon, index, isActive) {
78
69
  if (activeIcon && isActive) {
79
70
  icon = activeIcon;
80
71
  }
81
72
  if (typeof icon === 'function') {
82
- return /*#__PURE__*/React.createElement("span", {
73
+ return React.createElement("span", {
83
74
  className: "".concat(prefixCls, "-icon-wrapper")
84
75
  }, icon(index));
85
76
  }
86
- return /*#__PURE__*/React.createElement("span", {
77
+ return React.createElement("span", {
87
78
  className: "".concat(prefixCls, "-icon-second-content")
88
79
  }, icon);
89
80
  };
90
- /**
91
- * 获取第一个图标状态
92
- * @param value
93
- * @param index
94
- * @param onlyActiveCurrent
95
- * @param isSecondIconActive
96
- */
97
81
  var getFirstIconStatus = function getFirstIconStatus(value, index, onlyActiveCurrent, secondIconStatus) {
98
82
  var half = 0.5;
99
83
  var isInteger = _Number$isInteger(value);
@@ -103,18 +87,14 @@ var Rate = function Rate(props) {
103
87
  var isActiveFirst = value === index - half;
104
88
  var mark;
105
89
  if (secondIconStatus) {
106
- // 第二个图标被激活则第一个也必须激活
107
90
  mark = true;
108
91
  } else if (!onlyActiveCurrent) {
109
- // 激活点击位置所有左侧图标
110
92
  mark = isActiveAllLeft;
111
93
  } else if (isInteger) {
112
- // 点击全图标只激活当前点击图标
113
94
  mark = isActiveCurrent;
114
95
  } else {
115
- mark = isActiveFirst; // 点击半个图标只激活当前点击图标
96
+ mark = isActiveFirst;
116
97
  }
117
-
118
98
  return mark;
119
99
  };
120
100
  var transferValue = function transferValue(value, index) {
@@ -125,34 +105,18 @@ var Rate = function Rate(props) {
125
105
  return Math.round(value);
126
106
  }
127
107
  };
128
- /**
129
- * 获取第二个图标状态
130
- * @param value
131
- * @param index
132
- * @param onlyActiveCurrent
133
- */
134
108
  var getSecondIconStatus = function getSecondIconStatus(value, index, onlyActiveCurrent) {
135
109
  if (!onlyActiveCurrent) {
136
- // 激活所有左侧图标
137
110
  return value >= index;
138
111
  } else {
139
- return value === index; // 只激活当前点击图标
112
+ return value === index;
140
113
  }
141
114
  };
142
- /**
143
- * 返回图标的样式
144
- * @param isActive
145
- */
146
115
  var getIconStyle = function getIconStyle(isActive) {
147
116
  if (isActive) return {
148
117
  color: color
149
118
  };
150
119
  };
151
- /**
152
- *
153
- * @param selectActive 当前图标是否被选中
154
- * @param mouseActive 当前图标是否触发鼠标hover效果
155
- */
156
120
  var isSelected = function isSelected(selectActive, mouseActive) {
157
121
  return activeNumber !== 0 ? mouseActive : selectActive;
158
122
  };
@@ -160,9 +124,6 @@ var Rate = function Rate(props) {
160
124
  var _context, _classnames;
161
125
  return classnames((_classnames = {}, _defineProperty(_classnames, _concatInstanceProperty(_context = "".concat(prefixCls, "-icon-")).call(_context, name), true), _defineProperty(_classnames, "".concat(prefixCls, "-icon-selected"), isActive), _classnames));
162
126
  };
163
- /**
164
- * 获取图标视图
165
- */
166
127
  var getRateIconView = function getRateIconView() {
167
128
  var half = 0.5;
168
129
  var rateIconsView = [];
@@ -177,12 +138,12 @@ var Rate = function Rate(props) {
177
138
  var firstIconStyle = getIconStyle(isFirstActive);
178
139
  var firstIconClassName = getIconClassName('first', isFirstActive);
179
140
  var secondIconClassName = getIconClassName('second', isSecondActive);
180
- rateIconsView.push( /*#__PURE__*/React.createElement("span", {
141
+ rateIconsView.push(React.createElement("span", {
181
142
  className: "".concat(prefixCls, "-item"),
182
143
  key: i
183
- }, /*#__PURE__*/React.createElement("div", {
144
+ }, React.createElement("div", {
184
145
  className: "".concat(prefixCls, "-icon-view")
185
- }, allowHalf && /*#__PURE__*/React.createElement("span", {
146
+ }, allowHalf && React.createElement("span", {
186
147
  style: firstIconStyle,
187
148
  className: firstIconClassName,
188
149
  onClick: function onClick() {
@@ -194,7 +155,7 @@ var Rate = function Rate(props) {
194
155
  onMouseLeave: function onMouseLeave() {
195
156
  return handleMouseLeave();
196
157
  }
197
- }, getIcon(icon, activeIcon, i, isFirstActive)), /*#__PURE__*/React.createElement("span", {
158
+ }, getIcon(icon, activeIcon, i, isFirstActive)), React.createElement("span", {
198
159
  style: IconStyle,
199
160
  className: secondIconClassName,
200
161
  onClick: function onClick() {
@@ -213,19 +174,8 @@ var Rate = function Rate(props) {
213
174
  }
214
175
  return rateIconsView;
215
176
  };
216
- /**
217
- * 获取图标下方情感描述文字
218
- * @param index 图标对应索引
219
- */
220
- // const getEmotionalTextView = (index:number):React.ReactNode => {
221
- // return (
222
- // <span className={`${prefixCls}-item-text`}>
223
- // {emotionalText[index] ? emotionalText[index] : null}
224
- // </span>
225
- // )
226
- // }
227
177
  var getRateClassName = classnames(prefixCls, className, (_classnames2 = {}, _defineProperty(_classnames2, _concatInstanceProperty(_context2 = "".concat(prefixCls, "-size-")).call(_context2, size), size), _defineProperty(_classnames2, "".concat(prefixCls, "-disabled"), disabled), _classnames2));
228
- var rate = /*#__PURE__*/React.createElement("span", {
178
+ var rate = React.createElement("span", {
229
179
  className: getRateClassName,
230
180
  style: style,
231
181
  onMouseLeave: function onMouseLeave() {
@@ -23,7 +23,6 @@ var InternalOption = function InternalOption(props, ref) {
23
23
  var optionTagCls = classNames(_defineProperty({}, "".concat(optionPrefixCls, "-option-tag"), true));
24
24
  var optionContentCls = classNames(_defineProperty({}, "".concat(optionPrefixCls, "-option-content"), true));
25
25
  var handleClick = function handleClick() {
26
- // setSelected(!isSelected)
27
26
  onChangeSelect && (onChangeSelect === null || onChangeSelect === void 0 ? void 0 : onChangeSelect({
28
27
  tag: tag,
29
28
  label: searchValue,
@@ -31,17 +30,17 @@ var InternalOption = function InternalOption(props, ref) {
31
30
  }));
32
31
  };
33
32
  var formatSearchValue = isFormatVal ? getStringToArray(searchValue || '').join(" ".concat(getLangMsg('Search', 'or'), " ")) : searchValue;
34
- return /*#__PURE__*/React.createElement("div", {
33
+ return React.createElement("div", {
35
34
  ref: optionRef,
36
35
  className: optionCls,
37
36
  onClick: handleClick
38
- }, /*#__PURE__*/React.createElement("span", {
37
+ }, React.createElement("span", {
39
38
  className: optionTagCls
40
- }, "".concat(tag, "\uFF1A")), /*#__PURE__*/React.createElement("span", {
39
+ }, "".concat(tag, "\uFF1A")), React.createElement("span", {
41
40
  className: optionContentCls,
42
41
  title: formatSearchValue
43
42
  }, formatSearchValue));
44
43
  };
45
- var Option = /*#__PURE__*/React.forwardRef(InternalOption);
44
+ var Option = React.forwardRef(InternalOption);
46
45
  Option.displayName = 'Option';
47
46
  export default Option;