@douyinfe/semi-ui 2.27.1 → 2.28.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 (367) hide show
  1. package/dist/css/semi.css +228 -0
  2. package/dist/css/semi.min.css +1 -1
  3. package/dist/umd/semi-ui.js +2446 -2082
  4. package/dist/umd/semi-ui.js.map +1 -1
  5. package/dist/umd/semi-ui.min.js +1 -1
  6. package/dist/umd/semi-ui.min.js.map +1 -1
  7. package/lib/cjs/_portal/index.js +2 -2
  8. package/lib/cjs/_utils/index.js +3 -1
  9. package/lib/cjs/anchor/index.js +9 -9
  10. package/lib/cjs/anchor/link.js +8 -8
  11. package/lib/cjs/autoComplete/index.js +8 -4
  12. package/lib/cjs/autoComplete/option.js +7 -7
  13. package/lib/cjs/avatar/avatarGroup.js +7 -7
  14. package/lib/cjs/avatar/index.js +12 -12
  15. package/lib/cjs/badge/index.js +8 -8
  16. package/lib/cjs/banner/index.js +12 -12
  17. package/lib/cjs/breadcrumb/index.js +12 -12
  18. package/lib/cjs/breadcrumb/item.js +8 -8
  19. package/lib/cjs/button/Button.js +9 -9
  20. package/lib/cjs/button/buttonGroup.js +5 -5
  21. package/lib/cjs/button/splitButtonGroup.js +1 -1
  22. package/lib/cjs/calendar/dayCalendar.js +13 -13
  23. package/lib/cjs/calendar/dayCol.js +17 -17
  24. package/lib/cjs/calendar/monthCalendar.js +38 -38
  25. package/lib/cjs/calendar/rangeCalendar.js +27 -27
  26. package/lib/cjs/calendar/timeCol.js +6 -6
  27. package/lib/cjs/calendar/weekCalendar.js +27 -27
  28. package/lib/cjs/card/cardGroup.js +2 -2
  29. package/lib/cjs/card/index.js +16 -16
  30. package/lib/cjs/card/meta.js +5 -5
  31. package/lib/cjs/carousel/CarouselArrow.js +6 -6
  32. package/lib/cjs/carousel/CarouselIndicator.js +6 -6
  33. package/lib/cjs/carousel/index.js +12 -12
  34. package/lib/cjs/cascader/index.d.ts +5 -2
  35. package/lib/cjs/cascader/index.js +40 -38
  36. package/lib/cjs/cascader/item.d.ts +15 -1
  37. package/lib/cjs/cascader/item.js +64 -32
  38. package/lib/cjs/checkbox/checkbox.js +14 -14
  39. package/lib/cjs/checkbox/checkboxGroup.js +4 -4
  40. package/lib/cjs/checkbox/checkboxInner.js +6 -6
  41. package/lib/cjs/collapse/item.js +9 -9
  42. package/lib/cjs/collapsible/index.js +3 -3
  43. package/lib/cjs/configProvider/index.js +1 -1
  44. package/lib/cjs/datePicker/dateInput.js +16 -16
  45. package/lib/cjs/datePicker/datePicker.js +9 -9
  46. package/lib/cjs/datePicker/footer.js +1 -1
  47. package/lib/cjs/datePicker/index.js +1 -1
  48. package/lib/cjs/datePicker/month.js +2 -2
  49. package/lib/cjs/datePicker/monthsGrid.js +27 -27
  50. package/lib/cjs/datePicker/navigation.js +1 -1
  51. package/lib/cjs/datePicker/quickControl.js +14 -14
  52. package/lib/cjs/datePicker/yearAndMonth.js +4 -4
  53. package/lib/cjs/descriptions/index.js +3 -3
  54. package/lib/cjs/descriptions/item.js +5 -5
  55. package/lib/cjs/divider/index.js +7 -7
  56. package/lib/cjs/dropdown/dropdownDivider.js +1 -1
  57. package/lib/cjs/dropdown/dropdownItem.js +7 -7
  58. package/lib/cjs/dropdown/dropdownMenu.d.ts +1 -1
  59. package/lib/cjs/dropdown/dropdownMenu.js +1 -1
  60. package/lib/cjs/dropdown/dropdownTitle.js +2 -2
  61. package/lib/cjs/dropdown/index.d.ts +1 -1
  62. package/lib/cjs/dropdown/index.js +3 -3
  63. package/lib/cjs/empty/index.js +7 -7
  64. package/lib/cjs/form/arrayField.js +1 -1
  65. package/lib/cjs/form/baseForm.d.ts +3 -1
  66. package/lib/cjs/form/baseForm.js +2 -2
  67. package/lib/cjs/form/errorMessage.js +1 -1
  68. package/lib/cjs/form/field.d.ts +3 -1
  69. package/lib/cjs/form/group.js +2 -2
  70. package/lib/cjs/form/hoc/withField.js +16 -16
  71. package/lib/cjs/form/label.js +9 -9
  72. package/lib/cjs/form/slot.js +5 -5
  73. package/lib/cjs/grid/col.js +11 -11
  74. package/lib/cjs/grid/row.js +4 -4
  75. package/lib/cjs/highlight/index.js +1 -1
  76. package/lib/cjs/iconButton/index.js +5 -5
  77. package/lib/cjs/image/image.js +10 -10
  78. package/lib/cjs/image/preview.d.ts +1 -1
  79. package/lib/cjs/image/preview.js +3 -3
  80. package/lib/cjs/image/previewFooter.js +12 -12
  81. package/lib/cjs/image/previewHeader.js +3 -3
  82. package/lib/cjs/image/previewImage.js +7 -7
  83. package/lib/cjs/image/previewInner.js +7 -7
  84. package/lib/cjs/input/index.d.ts +1 -1
  85. package/lib/cjs/input/index.js +38 -38
  86. package/lib/cjs/input/inputGroup.js +7 -7
  87. package/lib/cjs/input/textarea.js +14 -14
  88. package/lib/cjs/inputNumber/index.js +11 -11
  89. package/lib/cjs/layout/Sider.d.ts +1 -0
  90. package/lib/cjs/layout/Sider.js +4 -3
  91. package/lib/cjs/layout/index.js +4 -2
  92. package/lib/cjs/list/index.js +11 -11
  93. package/lib/cjs/list/item.js +6 -6
  94. package/lib/cjs/modal/ConfirmModal.js +7 -7
  95. package/lib/cjs/modal/Modal.d.ts +0 -2
  96. package/lib/cjs/modal/Modal.js +8 -10
  97. package/lib/cjs/modal/ModalContent.js +24 -24
  98. package/lib/cjs/modal/useModal/index.js +1 -1
  99. package/lib/cjs/navigation/CollapseButton.js +1 -1
  100. package/lib/cjs/navigation/Footer.js +2 -2
  101. package/lib/cjs/navigation/Header.js +5 -5
  102. package/lib/cjs/navigation/Item.js +16 -16
  103. package/lib/cjs/navigation/SubNav.js +14 -14
  104. package/lib/cjs/navigation/index.js +8 -8
  105. package/lib/cjs/notification/index.js +3 -3
  106. package/lib/cjs/notification/notice.js +12 -12
  107. package/lib/cjs/overflowList/index.d.ts +1 -1
  108. package/lib/cjs/overflowList/index.js +32 -35
  109. package/lib/cjs/overflowList/intersectionObserver.js +3 -1
  110. package/lib/cjs/pagination/index.js +26 -26
  111. package/lib/cjs/popconfirm/index.js +9 -9
  112. package/lib/cjs/popover/index.js +2 -2
  113. package/lib/cjs/progress/index.js +14 -14
  114. package/lib/cjs/radio/radio.js +22 -22
  115. package/lib/cjs/radio/radioGroup.js +5 -5
  116. package/lib/cjs/radio/radioInner.js +7 -7
  117. package/lib/cjs/rating/index.js +5 -5
  118. package/lib/cjs/rating/item.js +11 -11
  119. package/lib/cjs/scrollList/index.js +5 -5
  120. package/lib/cjs/scrollList/scrollItem.js +13 -13
  121. package/lib/cjs/select/index.d.ts +11 -0
  122. package/lib/cjs/select/index.js +297 -116
  123. package/lib/cjs/select/option.js +7 -7
  124. package/lib/cjs/sideSheet/SideSheetContent.js +10 -10
  125. package/lib/cjs/sideSheet/index.js +7 -7
  126. package/lib/cjs/skeleton/index.js +1 -1
  127. package/lib/cjs/skeleton/item.js +4 -4
  128. package/lib/cjs/slider/index.js +28 -28
  129. package/lib/cjs/space/index.js +12 -12
  130. package/lib/cjs/spin/icon.js +2 -2
  131. package/lib/cjs/spin/index.d.ts +1 -1
  132. package/lib/cjs/spin/index.js +6 -6
  133. package/lib/cjs/steps/basicStep.js +14 -14
  134. package/lib/cjs/steps/basicSteps.js +6 -6
  135. package/lib/cjs/steps/fillStep.js +10 -10
  136. package/lib/cjs/steps/fillSteps.js +4 -4
  137. package/lib/cjs/steps/navStep.js +5 -5
  138. package/lib/cjs/steps/navSteps.js +2 -2
  139. package/lib/cjs/table/Body/BaseRow.js +5 -5
  140. package/lib/cjs/table/Body/ExpandedRow.js +3 -3
  141. package/lib/cjs/table/Body/SectionRow.js +1 -1
  142. package/lib/cjs/table/Body/index.js +8 -8
  143. package/lib/cjs/table/ColGroup.js +2 -2
  144. package/lib/cjs/table/ColumnFilter.js +3 -3
  145. package/lib/cjs/table/ColumnSelection.js +2 -2
  146. package/lib/cjs/table/ColumnSorter.js +7 -7
  147. package/lib/cjs/table/CustomExpandIcon.js +2 -2
  148. package/lib/cjs/table/HeadTable.js +3 -3
  149. package/lib/cjs/table/Table.js +20 -20
  150. package/lib/cjs/table/TableCell.js +8 -8
  151. package/lib/cjs/table/TableHeader.js +1 -1
  152. package/lib/cjs/table/TableHeaderRow.d.ts +1 -1
  153. package/lib/cjs/table/TableHeaderRow.js +8 -8
  154. package/lib/cjs/table/TablePagination.js +3 -3
  155. package/lib/cjs/tabs/TabBar.js +31 -49
  156. package/lib/cjs/tabs/TabItem.d.ts +18 -0
  157. package/lib/cjs/tabs/TabItem.js +95 -0
  158. package/lib/cjs/tabs/TabPane.js +3 -3
  159. package/lib/cjs/tabs/index.d.ts +2 -1
  160. package/lib/cjs/tabs/index.js +5 -2
  161. package/lib/cjs/tag/group.js +5 -5
  162. package/lib/cjs/tag/index.js +13 -13
  163. package/lib/cjs/tagInput/index.js +33 -33
  164. package/lib/cjs/timePicker/Combobox.js +4 -4
  165. package/lib/cjs/timePicker/TimeInput.js +4 -4
  166. package/lib/cjs/timePicker/TimePicker.js +8 -8
  167. package/lib/cjs/timeline/index.js +8 -8
  168. package/lib/cjs/timeline/item.js +7 -7
  169. package/lib/cjs/toast/index.js +5 -5
  170. package/lib/cjs/toast/toast.js +9 -9
  171. package/lib/cjs/tooltip/index.js +7 -7
  172. package/lib/cjs/transfer/index.js +31 -31
  173. package/lib/cjs/tree/autoSizer.js +1 -1
  174. package/lib/cjs/tree/index.js +6 -6
  175. package/lib/cjs/tree/interface.d.ts +1 -0
  176. package/lib/cjs/tree/nodeList.js +1 -1
  177. package/lib/cjs/tree/treeNode.js +26 -26
  178. package/lib/cjs/treeSelect/index.js +41 -41
  179. package/lib/cjs/typography/base.js +14 -14
  180. package/lib/cjs/typography/copyable.js +3 -3
  181. package/lib/cjs/typography/paragraph.js +1 -1
  182. package/lib/cjs/typography/title.d.ts +1 -1
  183. package/lib/cjs/typography/title.js +1 -1
  184. package/lib/cjs/typography/util.js +1 -1
  185. package/lib/cjs/upload/fileCard.js +32 -32
  186. package/lib/cjs/upload/index.js +37 -37
  187. package/lib/es/_portal/index.js +2 -2
  188. package/lib/es/_utils/index.js +3 -1
  189. package/lib/es/anchor/index.js +9 -9
  190. package/lib/es/anchor/link.js +8 -8
  191. package/lib/es/autoComplete/index.js +8 -4
  192. package/lib/es/autoComplete/option.js +7 -7
  193. package/lib/es/avatar/avatarGroup.js +7 -7
  194. package/lib/es/avatar/index.js +12 -12
  195. package/lib/es/badge/index.js +8 -8
  196. package/lib/es/banner/index.js +12 -12
  197. package/lib/es/breadcrumb/index.js +12 -12
  198. package/lib/es/breadcrumb/item.js +8 -8
  199. package/lib/es/button/Button.js +9 -9
  200. package/lib/es/button/buttonGroup.js +5 -5
  201. package/lib/es/button/splitButtonGroup.js +1 -1
  202. package/lib/es/calendar/dayCalendar.js +13 -13
  203. package/lib/es/calendar/dayCol.js +17 -17
  204. package/lib/es/calendar/monthCalendar.js +38 -38
  205. package/lib/es/calendar/rangeCalendar.js +27 -27
  206. package/lib/es/calendar/timeCol.js +6 -6
  207. package/lib/es/calendar/weekCalendar.js +27 -27
  208. package/lib/es/card/cardGroup.js +2 -2
  209. package/lib/es/card/index.js +16 -16
  210. package/lib/es/card/meta.js +5 -5
  211. package/lib/es/carousel/CarouselArrow.js +6 -6
  212. package/lib/es/carousel/CarouselIndicator.js +6 -6
  213. package/lib/es/carousel/index.js +12 -12
  214. package/lib/es/cascader/index.d.ts +5 -2
  215. package/lib/es/cascader/index.js +40 -38
  216. package/lib/es/cascader/item.d.ts +15 -1
  217. package/lib/es/cascader/item.js +64 -32
  218. package/lib/es/checkbox/checkbox.js +14 -14
  219. package/lib/es/checkbox/checkboxGroup.js +4 -4
  220. package/lib/es/checkbox/checkboxInner.js +6 -6
  221. package/lib/es/collapse/item.js +9 -9
  222. package/lib/es/collapsible/index.js +3 -3
  223. package/lib/es/configProvider/index.js +1 -1
  224. package/lib/es/datePicker/dateInput.js +16 -16
  225. package/lib/es/datePicker/datePicker.js +9 -9
  226. package/lib/es/datePicker/footer.js +1 -1
  227. package/lib/es/datePicker/index.js +1 -1
  228. package/lib/es/datePicker/month.js +2 -2
  229. package/lib/es/datePicker/monthsGrid.js +27 -27
  230. package/lib/es/datePicker/navigation.js +1 -1
  231. package/lib/es/datePicker/quickControl.js +14 -14
  232. package/lib/es/datePicker/yearAndMonth.js +4 -4
  233. package/lib/es/descriptions/index.js +3 -3
  234. package/lib/es/descriptions/item.js +5 -5
  235. package/lib/es/divider/index.js +7 -7
  236. package/lib/es/dropdown/dropdownDivider.js +1 -1
  237. package/lib/es/dropdown/dropdownItem.js +7 -7
  238. package/lib/es/dropdown/dropdownMenu.d.ts +1 -1
  239. package/lib/es/dropdown/dropdownMenu.js +1 -1
  240. package/lib/es/dropdown/dropdownTitle.js +2 -2
  241. package/lib/es/dropdown/index.d.ts +1 -1
  242. package/lib/es/dropdown/index.js +3 -3
  243. package/lib/es/empty/index.js +7 -7
  244. package/lib/es/form/arrayField.js +1 -1
  245. package/lib/es/form/baseForm.d.ts +3 -1
  246. package/lib/es/form/baseForm.js +2 -2
  247. package/lib/es/form/errorMessage.js +1 -1
  248. package/lib/es/form/field.d.ts +3 -1
  249. package/lib/es/form/group.js +2 -2
  250. package/lib/es/form/hoc/withField.js +16 -16
  251. package/lib/es/form/label.js +9 -9
  252. package/lib/es/form/slot.js +5 -5
  253. package/lib/es/grid/col.js +11 -11
  254. package/lib/es/grid/row.js +4 -4
  255. package/lib/es/highlight/index.js +1 -1
  256. package/lib/es/iconButton/index.js +5 -5
  257. package/lib/es/image/image.js +10 -10
  258. package/lib/es/image/preview.d.ts +1 -1
  259. package/lib/es/image/preview.js +3 -3
  260. package/lib/es/image/previewFooter.js +12 -12
  261. package/lib/es/image/previewHeader.js +3 -3
  262. package/lib/es/image/previewImage.js +7 -7
  263. package/lib/es/image/previewInner.js +7 -7
  264. package/lib/es/input/index.d.ts +1 -1
  265. package/lib/es/input/index.js +38 -38
  266. package/lib/es/input/inputGroup.js +7 -7
  267. package/lib/es/input/textarea.js +14 -14
  268. package/lib/es/inputNumber/index.js +11 -11
  269. package/lib/es/layout/Sider.d.ts +1 -0
  270. package/lib/es/layout/Sider.js +4 -3
  271. package/lib/es/layout/index.js +4 -2
  272. package/lib/es/list/index.js +11 -11
  273. package/lib/es/list/item.js +6 -6
  274. package/lib/es/modal/ConfirmModal.js +7 -7
  275. package/lib/es/modal/Modal.d.ts +0 -2
  276. package/lib/es/modal/Modal.js +8 -10
  277. package/lib/es/modal/ModalContent.js +24 -24
  278. package/lib/es/modal/useModal/index.js +1 -1
  279. package/lib/es/navigation/CollapseButton.js +1 -1
  280. package/lib/es/navigation/Footer.js +2 -2
  281. package/lib/es/navigation/Header.js +5 -5
  282. package/lib/es/navigation/Item.js +16 -16
  283. package/lib/es/navigation/SubNav.js +14 -14
  284. package/lib/es/navigation/index.js +8 -8
  285. package/lib/es/notification/index.js +3 -3
  286. package/lib/es/notification/notice.js +12 -12
  287. package/lib/es/overflowList/index.d.ts +1 -1
  288. package/lib/es/overflowList/index.js +31 -35
  289. package/lib/es/overflowList/intersectionObserver.js +2 -1
  290. package/lib/es/pagination/index.js +26 -26
  291. package/lib/es/popconfirm/index.js +9 -9
  292. package/lib/es/popover/index.js +2 -2
  293. package/lib/es/progress/index.js +14 -14
  294. package/lib/es/radio/radio.js +22 -22
  295. package/lib/es/radio/radioGroup.js +5 -5
  296. package/lib/es/radio/radioInner.js +7 -7
  297. package/lib/es/rating/index.js +5 -5
  298. package/lib/es/rating/item.js +11 -11
  299. package/lib/es/scrollList/index.js +5 -5
  300. package/lib/es/scrollList/scrollItem.js +13 -13
  301. package/lib/es/select/index.d.ts +11 -0
  302. package/lib/es/select/index.js +288 -112
  303. package/lib/es/select/option.js +7 -7
  304. package/lib/es/sideSheet/SideSheetContent.js +10 -10
  305. package/lib/es/sideSheet/index.js +7 -7
  306. package/lib/es/skeleton/index.js +1 -1
  307. package/lib/es/skeleton/item.js +4 -4
  308. package/lib/es/slider/index.js +28 -28
  309. package/lib/es/space/index.js +12 -12
  310. package/lib/es/spin/icon.js +2 -2
  311. package/lib/es/spin/index.d.ts +1 -1
  312. package/lib/es/spin/index.js +6 -6
  313. package/lib/es/steps/basicStep.js +14 -14
  314. package/lib/es/steps/basicSteps.js +6 -6
  315. package/lib/es/steps/fillStep.js +10 -10
  316. package/lib/es/steps/fillSteps.js +4 -4
  317. package/lib/es/steps/navStep.js +5 -5
  318. package/lib/es/steps/navSteps.js +2 -2
  319. package/lib/es/table/Body/BaseRow.js +5 -5
  320. package/lib/es/table/Body/ExpandedRow.js +3 -3
  321. package/lib/es/table/Body/SectionRow.js +1 -1
  322. package/lib/es/table/Body/index.js +8 -8
  323. package/lib/es/table/ColGroup.js +2 -2
  324. package/lib/es/table/ColumnFilter.js +3 -3
  325. package/lib/es/table/ColumnSelection.js +2 -2
  326. package/lib/es/table/ColumnSorter.js +7 -7
  327. package/lib/es/table/CustomExpandIcon.js +2 -2
  328. package/lib/es/table/HeadTable.js +3 -3
  329. package/lib/es/table/Table.js +20 -20
  330. package/lib/es/table/TableCell.js +8 -8
  331. package/lib/es/table/TableHeader.js +1 -1
  332. package/lib/es/table/TableHeaderRow.d.ts +1 -1
  333. package/lib/es/table/TableHeaderRow.js +8 -8
  334. package/lib/es/table/TablePagination.js +3 -3
  335. package/lib/es/tabs/TabBar.js +30 -50
  336. package/lib/es/tabs/TabItem.d.ts +18 -0
  337. package/lib/es/tabs/TabItem.js +78 -0
  338. package/lib/es/tabs/TabPane.js +3 -3
  339. package/lib/es/tabs/index.d.ts +2 -1
  340. package/lib/es/tabs/index.js +4 -2
  341. package/lib/es/tag/group.js +5 -5
  342. package/lib/es/tag/index.js +13 -13
  343. package/lib/es/tagInput/index.js +33 -33
  344. package/lib/es/timePicker/Combobox.js +4 -4
  345. package/lib/es/timePicker/TimeInput.js +4 -4
  346. package/lib/es/timePicker/TimePicker.js +8 -8
  347. package/lib/es/timeline/index.js +8 -8
  348. package/lib/es/timeline/item.js +7 -7
  349. package/lib/es/toast/index.js +5 -5
  350. package/lib/es/toast/toast.js +9 -9
  351. package/lib/es/tooltip/index.js +7 -7
  352. package/lib/es/transfer/index.js +31 -31
  353. package/lib/es/tree/autoSizer.js +1 -1
  354. package/lib/es/tree/index.js +6 -6
  355. package/lib/es/tree/interface.d.ts +1 -0
  356. package/lib/es/tree/nodeList.js +1 -1
  357. package/lib/es/tree/treeNode.js +26 -26
  358. package/lib/es/treeSelect/index.js +41 -41
  359. package/lib/es/typography/base.js +14 -14
  360. package/lib/es/typography/copyable.js +3 -3
  361. package/lib/es/typography/paragraph.js +1 -1
  362. package/lib/es/typography/title.d.ts +1 -1
  363. package/lib/es/typography/title.js +1 -1
  364. package/lib/es/typography/util.js +1 -1
  365. package/lib/es/upload/fileCard.js +32 -32
  366. package/lib/es/upload/index.js +37 -37
  367. package/package.json +8 -8
@@ -5,7 +5,7 @@ import PropTypes from "prop-types";
5
5
  import Spin from "../spin";
6
6
  import PreviewImageFoundation from '@douyinfe/semi-foundation/lib/es/image/previewImageFoundation';
7
7
  const prefixCls = cssClasses.PREFIX;
8
- const preViewImgPrefixCls = "".concat(prefixCls, "-preview-image");
8
+ const preViewImgPrefixCls = `${prefixCls}-preview-image`;
9
9
  let originImageWidth = null;
10
10
  let originImageHeight = null;
11
11
  let startMouseMove = false; // startMouseOffset:The offset of the mouse relative to the left and top of the picture
@@ -185,20 +185,20 @@ export default class PreviewImage extends BaseComponent {
185
185
  const imgStyle = {
186
186
  position: "absolute",
187
187
  visibility: loading ? "hidden" : "visible",
188
- transform: "rotate(".concat(-rotation, "deg)"),
188
+ transform: `rotate(${-rotation}deg)`,
189
189
  top,
190
190
  left,
191
- width: loading ? "auto" : "".concat(width, "px"),
192
- height: loading ? "auto" : "".concat(height, "px")
191
+ width: loading ? "auto" : `${width}px`,
192
+ height: loading ? "auto" : `${height}px`
193
193
  };
194
194
  return /*#__PURE__*/React.createElement("div", {
195
- className: "".concat(preViewImgPrefixCls),
195
+ className: `${preViewImgPrefixCls}`,
196
196
  ref: this.containerRef
197
197
  }, /*#__PURE__*/React.createElement("img", {
198
198
  ref: this.registryImageRef,
199
199
  src: src,
200
200
  alt: "previewImag",
201
- className: "".concat(preViewImgPrefixCls, "-img"),
201
+ className: `${preViewImgPrefixCls}-img`,
202
202
  key: src,
203
203
  onMouseMove: this.handleMoveImage,
204
204
  onMouseDown: this.onImageMouseDown,
@@ -211,7 +211,7 @@ export default class PreviewImage extends BaseComponent {
211
211
  crossOrigin: crossOrigin
212
212
  }), loading && /*#__PURE__*/React.createElement(Spin, {
213
213
  size: "large",
214
- wrapperClassName: "".concat(preViewImgPrefixCls, "-spin")
214
+ wrapperClassName: `${preViewImgPrefixCls}-spin`
215
215
  }));
216
216
  }
217
217
 
@@ -116,7 +116,7 @@ export default class PreviewInner extends BaseComponent {
116
116
 
117
117
  if (!getPopupContainer && this.bodyOverflow !== 'hidden') {
118
118
  document.body.style.overflow = 'hidden';
119
- document.body.style.width = "calc(".concat(this.originBodyWidth || '100%', " - ").concat(this.scrollBarWidth, "px)");
119
+ document.body.style.width = `calc(${this.originBodyWidth || '100%'} - ${this.scrollBarWidth}px)`;
120
120
  }
121
121
  },
122
122
  enabledBodyScroll: () => {
@@ -328,12 +328,12 @@ export default class PreviewInner extends BaseComponent {
328
328
  };
329
329
  }
330
330
 
331
- const previewPrefixCls = "".concat(prefixCls, "-preview");
331
+ const previewPrefixCls = `${prefixCls}-preview`;
332
332
  const previewWrapperCls = cls(previewPrefixCls, {
333
- ["".concat(prefixCls, "-hide")]: !visible,
334
- ["".concat(previewPrefixCls, "-popup")]: getPopupContainer
333
+ [`${prefixCls}-hide`]: !visible,
334
+ [`${previewPrefixCls}-popup`]: getPopupContainer
335
335
  }, className);
336
- const hideViewerCls = !viewerVisible ? "".concat(previewPrefixCls, "-hide") : "";
336
+ const hideViewerCls = !viewerVisible ? `${previewPrefixCls}-hide` : "";
337
337
  const total = imgSrc.length;
338
338
  const showPrev = total !== 1 && (infinite || currentIndex !== 0);
339
339
  const showNext = total !== 1 && (infinite || currentIndex !== total - 1);
@@ -371,7 +371,7 @@ export default class PreviewInner extends BaseComponent {
371
371
  /*#__PURE__*/
372
372
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
373
373
  React.createElement("div", {
374
- className: cls("".concat(previewPrefixCls, "-icon"), "".concat(previewPrefixCls, "-prev"), hideViewerCls),
374
+ className: cls(`${previewPrefixCls}-icon`, `${previewPrefixCls}-prev`, hideViewerCls),
375
375
  onClick: () => this.handleSwitchImage("prev")
376
376
  }, /*#__PURE__*/React.createElement(IconArrowLeft, {
377
377
  size: "large"
@@ -379,7 +379,7 @@ export default class PreviewInner extends BaseComponent {
379
379
  /*#__PURE__*/
380
380
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
381
381
  React.createElement("div", {
382
- className: cls("".concat(previewPrefixCls, "-icon"), "".concat(previewPrefixCls, "-next"), hideViewerCls),
382
+ className: cls(`${previewPrefixCls}-icon`, `${previewPrefixCls}-next`, hideViewerCls),
383
383
  onClick: () => this.handleSwitchImage("next")
384
384
  }, /*#__PURE__*/React.createElement(IconArrowRight, {
385
385
  size: "large"
@@ -154,7 +154,7 @@ declare class Input extends BaseComponent<InputProps, InputState> {
154
154
  getProps(): InputProps;
155
155
  getState(key: string): any;
156
156
  getStates(): InputState;
157
- setState(s: Pick<InputState, keyof InputState>, callback?: any): void;
157
+ setState<K extends keyof InputState>(s: Pick<InputState, K>, callback?: any): void;
158
158
  getCache(c: string): any;
159
159
  getCaches(): any;
160
160
  setCache(key: any, value: any): void;
@@ -168,9 +168,9 @@ class Input extends BaseComponent {
168
168
 
169
169
  if (addonBefore) {
170
170
  const prefixWrapperCls = cls({
171
- ["".concat(prefixCls, "-prepend")]: true,
172
- ["".concat(prefixCls, "-prepend-text")]: addonBefore && _isString(addonBefore),
173
- ["".concat(prefixCls, "-prepend-icon")]: isSemiIcon(addonBefore)
171
+ [`${prefixCls}-prepend`]: true,
172
+ [`${prefixCls}-prepend-text`]: addonBefore && _isString(addonBefore),
173
+ [`${prefixCls}-prepend-icon`]: isSemiIcon(addonBefore)
174
174
  });
175
175
  return /*#__PURE__*/React.createElement("div", {
176
176
  className: prefixWrapperCls,
@@ -188,9 +188,9 @@ class Input extends BaseComponent {
188
188
 
189
189
  if (addonAfter) {
190
190
  const prefixWrapperCls = cls({
191
- ["".concat(prefixCls, "-append")]: true,
192
- ["".concat(prefixCls, "-append-text")]: addonAfter && _isString(addonAfter),
193
- ["".concat(prefixCls, "-append-icon")]: isSemiIcon(addonAfter)
191
+ [`${prefixCls}-append`]: true,
192
+ [`${prefixCls}-append-text`]: addonAfter && _isString(addonAfter),
193
+ [`${prefixCls}-append-icon`]: isSemiIcon(addonAfter)
194
194
  });
195
195
  return /*#__PURE__*/React.createElement("div", {
196
196
  className: prefixWrapperCls,
@@ -202,7 +202,7 @@ class Input extends BaseComponent {
202
202
  }
203
203
 
204
204
  renderClearBtn() {
205
- const clearCls = cls("".concat(prefixCls, "-clearbtn"));
205
+ const clearCls = cls(`${prefixCls}-clearbtn`);
206
206
  const {
207
207
  clearIcon
208
208
  } = this.props;
@@ -230,7 +230,7 @@ class Input extends BaseComponent {
230
230
  mode,
231
231
  disabled
232
232
  } = this.props;
233
- const modeCls = cls("".concat(prefixCls, "-modebtn"));
233
+ const modeCls = cls(`${prefixCls}-modebtn`);
234
234
  const modeIcon = eyeClosed ? /*#__PURE__*/React.createElement(IconEyeClosedSolid, null) : /*#__PURE__*/React.createElement(IconEyeOpened, null); // alway show password button for a11y
235
235
 
236
236
  const showModeBtn = mode === 'password' && !disabled;
@@ -265,10 +265,10 @@ class Input extends BaseComponent {
265
265
  }
266
266
 
267
267
  const prefixWrapperCls = cls({
268
- ["".concat(prefixCls, "-prefix")]: true,
269
- ["".concat(prefixCls, "-inset-label")]: insetLabel,
270
- ["".concat(prefixCls, "-prefix-text")]: labelNode && _isString(labelNode),
271
- ["".concat(prefixCls, "-prefix-icon")]: isSemiIcon(labelNode)
268
+ [`${prefixCls}-prefix`]: true,
269
+ [`${prefixCls}-inset-label`]: insetLabel,
270
+ [`${prefixCls}-prefix-text`]: labelNode && _isString(labelNode),
271
+ [`${prefixCls}-prefix-icon`]: isSemiIcon(labelNode)
272
272
  });
273
273
  return (
274
274
  /*#__PURE__*/
@@ -307,10 +307,10 @@ class Input extends BaseComponent {
307
307
  }
308
308
 
309
309
  const suffixWrapperCls = cls({
310
- ["".concat(prefixCls, "-suffix")]: true,
311
- ["".concat(prefixCls, "-suffix-text")]: suffix && _isString(suffix),
312
- ["".concat(prefixCls, "-suffix-icon")]: isSemiIcon(suffix),
313
- ["".concat(prefixCls, "-suffix-hidden")]: suffixAllowClear && Boolean(hideSuffix)
310
+ [`${prefixCls}-suffix`]: true,
311
+ [`${prefixCls}-suffix-text`]: suffix && _isString(suffix),
312
+ [`${prefixCls}-suffix-icon`]: isSemiIcon(suffix),
313
+ [`${prefixCls}-suffix-hidden`]: suffixAllowClear && Boolean(hideSuffix)
314
314
  });
315
315
  return (
316
316
  /*#__PURE__*/
@@ -387,31 +387,31 @@ class Input extends BaseComponent {
387
387
  const suffixAllowClear = this.showClearBtn();
388
388
  const suffixIsIcon = isSemiIcon(suffix);
389
389
  const ref = this.getInputRef();
390
- const wrapperPrefix = "".concat(prefixCls, "-wrapper");
390
+ const wrapperPrefix = `${prefixCls}-wrapper`;
391
391
  const wrapperCls = cls(wrapperPrefix, className, {
392
- ["".concat(prefixCls, "-wrapper__with-prefix")]: prefix || insetLabel,
393
- ["".concat(prefixCls, "-wrapper__with-suffix")]: suffix,
394
- ["".concat(prefixCls, "-wrapper__with-suffix-hidden")]: suffixAllowClear && Boolean(hideSuffix),
395
- ["".concat(prefixCls, "-wrapper__with-suffix-icon")]: suffixIsIcon,
396
- ["".concat(prefixCls, "-wrapper__with-append")]: addonBefore,
397
- ["".concat(prefixCls, "-wrapper__with-prepend")]: addonAfter,
398
- ["".concat(prefixCls, "-wrapper__with-append-only")]: addonBefore && !addonAfter,
399
- ["".concat(prefixCls, "-wrapper__with-prepend-only")]: !addonBefore && addonAfter,
400
- ["".concat(wrapperPrefix, "-readonly")]: readonly,
401
- ["".concat(wrapperPrefix, "-disabled")]: disabled,
402
- ["".concat(wrapperPrefix, "-warning")]: validateStatus === 'warning',
403
- ["".concat(wrapperPrefix, "-error")]: validateStatus === 'error',
404
- ["".concat(wrapperPrefix, "-focus")]: isFocus,
405
- ["".concat(wrapperPrefix, "-clearable")]: showClear,
406
- ["".concat(wrapperPrefix, "-modebtn")]: mode === 'password',
407
- ["".concat(wrapperPrefix, "-hidden")]: type === 'hidden',
408
- ["".concat(wrapperPrefix, "-").concat(size)]: size
392
+ [`${prefixCls}-wrapper__with-prefix`]: prefix || insetLabel,
393
+ [`${prefixCls}-wrapper__with-suffix`]: suffix,
394
+ [`${prefixCls}-wrapper__with-suffix-hidden`]: suffixAllowClear && Boolean(hideSuffix),
395
+ [`${prefixCls}-wrapper__with-suffix-icon`]: suffixIsIcon,
396
+ [`${prefixCls}-wrapper__with-append`]: addonBefore,
397
+ [`${prefixCls}-wrapper__with-prepend`]: addonAfter,
398
+ [`${prefixCls}-wrapper__with-append-only`]: addonBefore && !addonAfter,
399
+ [`${prefixCls}-wrapper__with-prepend-only`]: !addonBefore && addonAfter,
400
+ [`${wrapperPrefix}-readonly`]: readonly,
401
+ [`${wrapperPrefix}-disabled`]: disabled,
402
+ [`${wrapperPrefix}-warning`]: validateStatus === 'warning',
403
+ [`${wrapperPrefix}-error`]: validateStatus === 'error',
404
+ [`${wrapperPrefix}-focus`]: isFocus,
405
+ [`${wrapperPrefix}-clearable`]: showClear,
406
+ [`${wrapperPrefix}-modebtn`]: mode === 'password',
407
+ [`${wrapperPrefix}-hidden`]: type === 'hidden',
408
+ [`${wrapperPrefix}-${size}`]: size
409
409
  });
410
410
  const inputCls = cls(prefixCls, {
411
- ["".concat(prefixCls, "-").concat(size)]: size,
412
- ["".concat(prefixCls, "-disabled")]: disabled,
413
- ["".concat(prefixCls, "-sibling-clearbtn")]: this.foundation.isAllowClear(),
414
- ["".concat(prefixCls, "-sibling-modebtn")]: mode === 'password'
411
+ [`${prefixCls}-${size}`]: size,
412
+ [`${prefixCls}-disabled`]: disabled,
413
+ [`${prefixCls}-sibling-clearbtn`]: this.foundation.isAllowClear(),
414
+ [`${prefixCls}-sibling-modebtn`]: mode === 'password'
415
415
  });
416
416
  const inputValue = value === null || value === undefined ? '' : value;
417
417
  const inputProps = Object.assign(Object.assign({}, rest), {
@@ -36,12 +36,12 @@ export default class inputGroup extends BaseComponent {
36
36
  rest = __rest(_a, ["size", "className", "label", "labelPosition"]);
37
37
 
38
38
  const groupWrapperCls = cls({
39
- ["".concat(prefixCls, "-group-wrapper")]: true,
40
- ["".concat(prefixCls, "-group-wrapper-with-top-label")]: labelPosition === 'top',
41
- ["".concat(prefixCls, "-group-wrapper-with-left-label")]: labelPosition === 'left'
39
+ [`${prefixCls}-group-wrapper`]: true,
40
+ [`${prefixCls}-group-wrapper-with-top-label`]: labelPosition === 'top',
41
+ [`${prefixCls}-group-wrapper-with-left-label`]: labelPosition === 'left'
42
42
  });
43
- const groupCls = cls("".concat(prefixCls, "-group"), className, {
44
- ["".concat(prefixCls, "-").concat(size)]: size !== 'default'
43
+ const groupCls = cls(`${prefixCls}-group`, className, {
44
+ [`${prefixCls}-${size}`]: size !== 'default'
45
45
  }); // const labelCls = cls(label.className, '');
46
46
 
47
47
  const defaultName = 'input-group';
@@ -74,8 +74,8 @@ export default class inputGroup extends BaseComponent {
74
74
  } = _a,
75
75
  rest = __rest(_a, ["size", "style", "className", "children", "label", "onBlur", "onFocus", "disabled"]);
76
76
 
77
- const groupCls = cls("".concat(prefixCls, "-group"), {
78
- ["".concat(prefixCls, "-").concat(size)]: size !== 'default'
77
+ const groupCls = cls(`${prefixCls}-group`, {
78
+ [`${prefixCls}-${size}`]: size !== 'default'
79
79
  }, className);
80
80
  let inner;
81
81
 
@@ -152,8 +152,8 @@ class TextArea extends BaseComponent {
152
152
  showClear
153
153
  } = this.props;
154
154
  const displayClearBtn = this.foundation.isAllowClear();
155
- const clearCls = cls("".concat(prefixCls, "-clearbtn"), {
156
- ["".concat(prefixCls, "-clearbtn-hidden")]: !displayClearBtn
155
+ const clearCls = cls(`${prefixCls}-clearbtn`, {
156
+ [`${prefixCls}-clearbtn-hidden`]: !displayClearBtn
157
157
  });
158
158
 
159
159
  if (showClear) {
@@ -185,8 +185,8 @@ class TextArea extends BaseComponent {
185
185
 
186
186
  current = value ? _isFunction(getValueLength) ? getValueLength(value) : value.length : 0;
187
187
  total = maxCount || null;
188
- countCls = cls("".concat(prefixCls, "-textarea-counter"), {
189
- ["".concat(prefixCls, "-textarea-counter-exceed")]: current > total
188
+ countCls = cls(`${prefixCls}-textarea-counter`, {
189
+ [`${prefixCls}-textarea-counter-exceed`]: current > total
190
190
  });
191
191
  counter = /*#__PURE__*/React.createElement("div", {
192
192
  className: countCls
@@ -227,19 +227,19 @@ class TextArea extends BaseComponent {
227
227
  value,
228
228
  minLength: stateMinLength
229
229
  } = this.state;
230
- const wrapperCls = cls(className, "".concat(prefixCls, "-textarea-wrapper"), {
231
- ["".concat(prefixCls, "-textarea-wrapper-disabled")]: disabled,
232
- ["".concat(prefixCls, "-textarea-wrapper-readonly")]: readonly,
233
- ["".concat(prefixCls, "-textarea-wrapper-").concat(validateStatus)]: Boolean(validateStatus),
234
- ["".concat(prefixCls, "-textarea-wrapper-focus")]: isFocus // [`${prefixCls}-textarea-wrapper-resize`]: !autosize && resize,
230
+ const wrapperCls = cls(className, `${prefixCls}-textarea-wrapper`, {
231
+ [`${prefixCls}-textarea-wrapper-disabled`]: disabled,
232
+ [`${prefixCls}-textarea-wrapper-readonly`]: readonly,
233
+ [`${prefixCls}-textarea-wrapper-${validateStatus}`]: Boolean(validateStatus),
234
+ [`${prefixCls}-textarea-wrapper-focus`]: isFocus // [`${prefixCls}-textarea-wrapper-resize`]: !autosize && resize,
235
235
 
236
236
  }); // const ref = this.props.forwardRef || this.textAreaRef;
237
237
 
238
- const itemCls = cls("".concat(prefixCls, "-textarea"), {
239
- ["".concat(prefixCls, "-textarea-disabled")]: disabled,
240
- ["".concat(prefixCls, "-textarea-readonly")]: readonly,
241
- ["".concat(prefixCls, "-textarea-autosize")]: autosize,
242
- ["".concat(prefixCls, "-textarea-showClear")]: showClear
238
+ const itemCls = cls(`${prefixCls}-textarea`, {
239
+ [`${prefixCls}-textarea-disabled`]: disabled,
240
+ [`${prefixCls}-textarea-readonly`]: readonly,
241
+ [`${prefixCls}-textarea-autosize`]: autosize,
242
+ [`${prefixCls}-textarea-showClear`]: showClear
243
243
  });
244
244
  const itemProps = Object.assign(Object.assign({}, _omit(rest, 'insetLabel', 'insetLabelId', 'getValueLength', 'onClear', 'showClear')), {
245
245
  className: itemCls,
@@ -92,17 +92,17 @@ class InputNumber extends BaseComponent {
92
92
  } = this.state;
93
93
  const notAllowedUp = disabled ? disabled : number === max;
94
94
  const notAllowedDown = disabled ? disabled : number === min;
95
- const suffixChildrenCls = classnames("".concat(prefixCls, "-number-suffix-btns"), {
96
- ["".concat(prefixCls, "-number-suffix-btns-inner")]: innerButtons,
97
- ["".concat(prefixCls, "-number-suffix-btns-inner-hover")]: innerButtons && hovering && !focusing
95
+ const suffixChildrenCls = classnames(`${prefixCls}-number-suffix-btns`, {
96
+ [`${prefixCls}-number-suffix-btns-inner`]: innerButtons,
97
+ [`${prefixCls}-number-suffix-btns-inner-hover`]: innerButtons && hovering && !focusing
98
98
  });
99
- const upClassName = classnames("".concat(prefixCls, "-number-button"), "".concat(prefixCls, "-number-button-up"), {
100
- ["".concat(prefixCls, "-number-button-up-disabled")]: disabled,
101
- ["".concat(prefixCls, "-number-button-up-not-allowed")]: notAllowedUp
99
+ const upClassName = classnames(`${prefixCls}-number-button`, `${prefixCls}-number-button-up`, {
100
+ [`${prefixCls}-number-button-up-disabled`]: disabled,
101
+ [`${prefixCls}-number-button-up-not-allowed`]: notAllowedUp
102
102
  });
103
- const downClassName = classnames("".concat(prefixCls, "-number-button"), "".concat(prefixCls, "-number-button-down"), {
104
- ["".concat(prefixCls, "-number-button-down-disabled")]: disabled,
105
- ["".concat(prefixCls, "-number-button-down-not-allowed")]: notAllowedDown
103
+ const downClassName = classnames(`${prefixCls}-number-button`, `${prefixCls}-number-button-down`, {
104
+ [`${prefixCls}-number-button-down-disabled`]: disabled,
105
+ [`${prefixCls}-number-button-down-not-allowed`]: notAllowedDown
106
106
  });
107
107
  return /*#__PURE__*/React.createElement("div", {
108
108
  className: suffixChildrenCls
@@ -428,8 +428,8 @@ class InputNumber extends BaseComponent {
428
428
  value,
429
429
  number
430
430
  } = this.state;
431
- const inputNumberCls = classnames(className, "".concat(prefixCls, "-number"), {
432
- ["".concat(prefixCls, "-number-size-").concat(size)]: size
431
+ const inputNumberCls = classnames(className, `${prefixCls}-number`, {
432
+ [`${prefixCls}-number-size-${size}`]: size
433
433
  });
434
434
  const buttons = this.renderButtons();
435
435
  const ariaProps = {
@@ -33,6 +33,7 @@ declare class Sider extends React.PureComponent<SiderProps> {
33
33
  prefixCls: string;
34
34
  };
35
35
  static contextType: React.Context<ContextType>;
36
+ static elementType: string;
36
37
  unRegisters: Array<() => void>;
37
38
  context: ContextType;
38
39
  uniqueId: string;
@@ -29,7 +29,7 @@ const generateId = (() => {
29
29
  let i = 0;
30
30
  return () => {
31
31
  i += 1;
32
- return "".concat(cssClasses.PREFIX, "-sider-").concat(i);
32
+ return `${cssClasses.PREFIX}-sider-${i}`;
33
33
  };
34
34
  })();
35
35
 
@@ -92,14 +92,14 @@ class Sider extends React.PureComponent {
92
92
  others = __rest(_a, ["prefixCls", "className", "children", "style"]);
93
93
 
94
94
  const classString = cls(className, {
95
- ["".concat(prefixCls, "-sider")]: true
95
+ [`${prefixCls}-sider`]: true
96
96
  });
97
97
  return /*#__PURE__*/React.createElement("aside", Object.assign({
98
98
  className: classString,
99
99
  "aria-label": this.props['aria-label'],
100
100
  style: style
101
101
  }, getDataAttr(others)), /*#__PURE__*/React.createElement("div", {
102
- className: "".concat(prefixCls, "-sider-children")
102
+ className: `${prefixCls}-sider-children`
103
103
  }, children));
104
104
  }
105
105
 
@@ -118,4 +118,5 @@ Sider.defaultProps = {
118
118
  prefixCls: cssClasses.PREFIX
119
119
  };
120
120
  Sider.contextType = LayoutContext;
121
+ Sider.elementType = "Layout.Sider";
121
122
  export default Sider;
@@ -51,7 +51,7 @@ class Basic extends React.PureComponent {
51
51
  } = _a,
52
52
  others = __rest(_a, ["prefixCls", "type", "className", "children", "tagName"]);
53
53
 
54
- const classString = cls(className, "".concat(prefixCls, "-").concat(type));
54
+ const classString = cls(className, `${prefixCls}-${type}`);
55
55
  return /*#__PURE__*/React.createElement(tagName, Object.assign({
56
56
  className: classString
57
57
  }, others), children);
@@ -109,7 +109,9 @@ class Layout extends React.Component {
109
109
  siders
110
110
  } = this.state;
111
111
  const classString = cls(className, prefixCls, {
112
- ["".concat(prefixCls, "-has-sider")]: typeof hasSider === 'boolean' ? hasSider : siders.length > 0
112
+ [`${prefixCls}-has-sider`]: typeof hasSider === 'boolean' && hasSider || siders.length > 0 || React.Children.toArray(children).some(child => {
113
+ return /*#__PURE__*/React.isValidElement(child) && child.type && child.type.elementType === "Layout.Sider";
114
+ })
113
115
  });
114
116
  const Tag = tagName;
115
117
  return /*#__PURE__*/React.createElement(LayoutContext.Provider, {
@@ -23,14 +23,14 @@ class List extends BaseComponent {
23
23
 
24
24
  if (emptyContent) {
25
25
  return /*#__PURE__*/React.createElement("div", {
26
- className: "".concat(cssClasses.PREFIX, "-empty"),
26
+ className: `${cssClasses.PREFIX}-empty`,
27
27
  "x-semi-prop": "emptyContent"
28
28
  }, emptyContent);
29
29
  } else {
30
30
  return /*#__PURE__*/React.createElement(LocaleConsumer, {
31
31
  componentName: "List"
32
32
  }, locale => /*#__PURE__*/React.createElement("div", {
33
- className: "".concat(cssClasses.PREFIX, "-empty")
33
+ className: `${cssClasses.PREFIX}-empty`
34
34
  }, locale.emptyText));
35
35
  }
36
36
  };
@@ -54,7 +54,7 @@ class List extends BaseComponent {
54
54
  }
55
55
 
56
56
  return /*#__PURE__*/React.createElement("ul", {
57
- className: "".concat(prefixCls, "-items")
57
+ className: `${prefixCls}-items`
58
58
  }, childrenList ? childrenList : null, children);
59
59
  }
60
60
 
@@ -78,11 +78,11 @@ class List extends BaseComponent {
78
78
  children
79
79
  } = this.props;
80
80
  const wrapperCls = cls(prefixCls, className, {
81
- ["".concat(prefixCls, "-flex")]: layout === 'horizontal',
82
- ["".concat(prefixCls, "-").concat(size)]: size,
83
- ["".concat(prefixCls, "-grid")]: grid,
84
- ["".concat(prefixCls, "-split")]: split,
85
- ["".concat(prefixCls, "-bordered")]: bordered
81
+ [`${prefixCls}-flex`]: layout === 'horizontal',
82
+ [`${prefixCls}-${size}`]: size,
83
+ [`${prefixCls}-grid`]: grid,
84
+ [`${prefixCls}-split`]: split,
85
+ [`${prefixCls}-bordered`]: bordered
86
86
  });
87
87
  let childrenList;
88
88
 
@@ -90,7 +90,7 @@ class List extends BaseComponent {
90
90
  childrenList = [];
91
91
  const items = renderItem ? dataSource.map((item, index) => renderItem(item, index)) : [];
92
92
  React.Children.forEach(items, (child, index) => {
93
- const itemKey = child.key || "list-item-".concat(index);
93
+ const itemKey = child.key || `list-item-${index}`;
94
94
  childrenList.push( /*#__PURE__*/React.cloneElement(child, {
95
95
  key: itemKey
96
96
  }));
@@ -103,7 +103,7 @@ class List extends BaseComponent {
103
103
  className: wrapperCls,
104
104
  style: style
105
105
  }, header ? /*#__PURE__*/React.createElement("div", {
106
- className: "".concat(cssClasses.PREFIX, "-header"),
106
+ className: `${cssClasses.PREFIX}-header`,
107
107
  "x-semi-prop": "header"
108
108
  }, header) : null, /*#__PURE__*/React.createElement(ListContext.Provider, {
109
109
  value: {
@@ -115,7 +115,7 @@ class List extends BaseComponent {
115
115
  spinning: loading,
116
116
  size: "large"
117
117
  }, this.wrapChildren(childrenList, children))), footer ? /*#__PURE__*/React.createElement("div", {
118
- className: "".concat(cssClasses.PREFIX, "-footer"),
118
+ className: `${cssClasses.PREFIX}-footer`,
119
119
  "x-semi-prop": "footer"
120
120
  }, footer) : null, loadMore ? loadMore : null);
121
121
  }
@@ -56,9 +56,9 @@ export default class ListItem extends PureComponent {
56
56
  } = this.context;
57
57
  const handleContextMenu = onRightClick ? onRightClick : contextOnRightClick;
58
58
  const handleClick = onClick ? onClick : contextOnClick;
59
- const itemCls = cls("".concat(prefixCls, "-item"), className);
60
- const bodyCls = cls("".concat(prefixCls, "-item-body"), {
61
- ["".concat(prefixCls, "-item-body-").concat(align)]: align
59
+ const itemCls = cls(`${prefixCls}-item`, className);
60
+ const bodyCls = cls(`${prefixCls}-item-body`, {
61
+ [`${prefixCls}-item-body-${align}`]: align
62
62
  });
63
63
  let body;
64
64
 
@@ -66,9 +66,9 @@ export default class ListItem extends PureComponent {
66
66
  body = /*#__PURE__*/React.createElement("div", {
67
67
  className: bodyCls
68
68
  }, header ? /*#__PURE__*/React.createElement("div", {
69
- className: "".concat(prefixCls, "-item-body-header")
69
+ className: `${prefixCls}-item-body-header`
70
70
  }, header) : null, main ? /*#__PURE__*/React.createElement("div", {
71
- className: "".concat(prefixCls, "-item-body-main")
71
+ className: `${prefixCls}-item-body-main`
72
72
  }, main) : null);
73
73
  }
74
74
 
@@ -83,7 +83,7 @@ export default class ListItem extends PureComponent {
83
83
  onMouseEnter: onMouseEnter,
84
84
  onMouseLeave: onMouseLeave
85
85
  }, body ? body : null, children, extra ? /*#__PURE__*/React.createElement("div", {
86
- className: "".concat(prefixCls, "-item-extra")
86
+ className: `${prefixCls}-item-extra`
87
87
  }, extra) : null);
88
88
 
89
89
  if (this.context && contextGrid) {
@@ -69,20 +69,20 @@ const ConfirmModal = props => {
69
69
  setVisible(false);
70
70
  }
71
71
  }, [onCancel]);
72
- const confirmCls = "".concat(cssClasses.DIALOG, "-confirm");
72
+ const confirmCls = `${cssClasses.DIALOG}-confirm`;
73
73
  const wrapperCls = cls(className, confirmCls, {
74
- ["".concat(confirmCls, "-rtl")]: direction === 'rtl'
74
+ [`${confirmCls}-rtl`]: direction === 'rtl'
75
75
  });
76
- const typeCls = cls("".concat(cssClasses.DIALOG, "-").concat(type));
76
+ const typeCls = cls(`${cssClasses.DIALOG}-${type}`);
77
77
  const iconNode = isSemiIcon(icon) ? /*#__PURE__*/React.cloneElement(icon, {
78
- className: "".concat(confirmCls, "-icon ").concat(typeCls, "-icon"),
78
+ className: `${confirmCls}-icon ${typeCls}-icon`,
79
79
  size: 'extra-large'
80
80
  }) : icon;
81
81
  const titleNode = title == null ? null : /*#__PURE__*/React.createElement("span", {
82
- className: "".concat(confirmCls, "-title-text")
82
+ className: `${confirmCls}-title-text`
83
83
  }, title);
84
- const contentCls = cls("".concat(confirmCls, "-content"), {
85
- ["".concat(confirmCls, "-content-withIcon")]: props.icon
84
+ const contentCls = cls(`${confirmCls}-content`, {
85
+ [`${confirmCls}-content-withIcon`]: props.icon
86
86
  });
87
87
  return /*#__PURE__*/React.createElement(Modal, Object.assign({
88
88
  className: wrapperCls,
@@ -74,8 +74,6 @@ declare class Modal extends BaseComponent<ModalReactProps, ModalState> {
74
74
  centered: boolean;
75
75
  closable: boolean;
76
76
  visible: boolean;
77
- confirmLoading: boolean;
78
- cancelLoading: boolean;
79
77
  okType: string;
80
78
  maskClosable: boolean;
81
79
  hasCancel: boolean;
@@ -65,7 +65,7 @@ class Modal extends BaseComponent {
65
65
  return /*#__PURE__*/React.createElement(Button, Object.assign({
66
66
  "aria-label": "cancel",
67
67
  onClick: this.handleCancel,
68
- loading: cancelLoading,
68
+ loading: cancelLoading === undefined ? this.state.onCancelReturnPromiseStatus === "pending" : cancelLoading,
69
69
  type: "tertiary",
70
70
  autoFocus: true
71
71
  }, this.props.cancelButtonProps, {
@@ -80,7 +80,7 @@ class Modal extends BaseComponent {
80
80
  "aria-label": "confirm",
81
81
  type: okType,
82
82
  theme: "solid",
83
- loading: confirmLoading,
83
+ loading: confirmLoading === undefined ? this.state.onOKReturnPromiseStatus === "pending" : confirmLoading,
84
84
  onClick: this.handleOk
85
85
  }, this.props.okButtonProps, {
86
86
  "x-semi-children-alias": "okText"
@@ -125,7 +125,7 @@ class Modal extends BaseComponent {
125
125
  }
126
126
 
127
127
  const classList = cls(className, {
128
- ["".concat(cssClasses.DIALOG, "-displayNone")]: keepDOM && this.state.displayNone
128
+ [`${cssClasses.DIALOG}-displayNone`]: keepDOM && this.state.displayNone
129
129
  });
130
130
  const shouldRender = this.props.visible || this.props.keepDOM && (!this.props.lazyRender || this._haveRendered) || this.props.motion && !this.state.displayNone
131
131
  /* When there is animation, we use displayNone to judge whether animation is ended and judge whether to unmount content */
@@ -141,7 +141,7 @@ class Modal extends BaseComponent {
141
141
  }, /*#__PURE__*/React.createElement(CSSAnimation, {
142
142
  motion: this.props.motion,
143
143
  animationState: visible ? 'enter' : 'leave',
144
- startClassName: visible ? "".concat(cssClasses.DIALOG, "-content-animate-show") : "".concat(cssClasses.DIALOG, "-content-animate-hide"),
144
+ startClassName: visible ? `${cssClasses.DIALOG}-content-animate-show` : `${cssClasses.DIALOG}-content-animate-hide`,
145
145
  onAnimationEnd: () => {
146
146
  this.updateState();
147
147
  }
@@ -153,7 +153,7 @@ class Modal extends BaseComponent {
153
153
  return /*#__PURE__*/React.createElement(CSSAnimation, {
154
154
  motion: this.props.motion,
155
155
  animationState: visible ? 'enter' : 'leave',
156
- startClassName: visible ? "".concat(cssClasses.DIALOG, "-mask-animate-show") : "".concat(cssClasses.DIALOG, "-mask-animate-hide"),
156
+ startClassName: visible ? `${cssClasses.DIALOG}-mask-animate-show` : `${cssClasses.DIALOG}-mask-animate-hide`,
157
157
  onAnimationEnd: () => {
158
158
  this.updateState();
159
159
  }
@@ -202,7 +202,7 @@ class Modal extends BaseComponent {
202
202
 
203
203
  if (!getPopupContainer && this.bodyOverflow !== 'hidden') {
204
204
  document.body.style.overflow = 'hidden';
205
- document.body.style.width = "calc(".concat(this.originBodyWidth || '100%', " - ").concat(this.scrollBarWidth, "px)");
205
+ document.body.style.width = `calc(${this.originBodyWidth || '100%'} - ${this.scrollBarWidth}px)`;
206
206
  }
207
207
  },
208
208
  enabledBodyScroll: () => {
@@ -216,10 +216,10 @@ class Modal extends BaseComponent {
216
216
  }
217
217
  },
218
218
  notifyCancel: e => {
219
- this.props.onCancel(e);
219
+ return this.props.onCancel(e);
220
220
  },
221
221
  notifyOk: e => {
222
- this.props.onOk(e);
222
+ return this.props.onOk(e);
223
223
  },
224
224
  notifyClose: () => {
225
225
  this.props.afterClose();
@@ -352,8 +352,6 @@ Modal.defaultProps = {
352
352
  centered: false,
353
353
  closable: true,
354
354
  visible: false,
355
- confirmLoading: false,
356
- cancelLoading: false,
357
355
  okType: 'primary',
358
356
  maskClosable: true,
359
357
  hasCancel: true,