@douyinfe/semi-ui 2.28.0-alpha.0 → 2.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (353) hide show
  1. package/dist/css/semi.css +227 -0
  2. package/dist/css/semi.min.css +1 -1
  3. package/dist/umd/semi-ui.js +2393 -2068
  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.js +1 -1
  59. package/lib/cjs/dropdown/dropdownTitle.js +2 -2
  60. package/lib/cjs/dropdown/index.js +3 -3
  61. package/lib/cjs/empty/index.js +7 -7
  62. package/lib/cjs/form/arrayField.js +1 -1
  63. package/lib/cjs/form/baseForm.d.ts +2 -0
  64. package/lib/cjs/form/baseForm.js +2 -2
  65. package/lib/cjs/form/errorMessage.js +1 -1
  66. package/lib/cjs/form/field.d.ts +2 -0
  67. package/lib/cjs/form/group.js +2 -2
  68. package/lib/cjs/form/hoc/withField.js +16 -16
  69. package/lib/cjs/form/label.js +9 -9
  70. package/lib/cjs/form/slot.js +5 -5
  71. package/lib/cjs/grid/col.js +11 -11
  72. package/lib/cjs/grid/row.js +4 -4
  73. package/lib/cjs/highlight/index.js +1 -1
  74. package/lib/cjs/iconButton/index.js +5 -5
  75. package/lib/cjs/image/image.js +10 -10
  76. package/lib/cjs/image/preview.js +3 -3
  77. package/lib/cjs/image/previewFooter.js +12 -12
  78. package/lib/cjs/image/previewHeader.js +3 -3
  79. package/lib/cjs/image/previewImage.js +7 -7
  80. package/lib/cjs/image/previewInner.js +7 -7
  81. package/lib/cjs/input/index.js +38 -38
  82. package/lib/cjs/input/inputGroup.js +7 -7
  83. package/lib/cjs/input/textarea.js +14 -14
  84. package/lib/cjs/inputNumber/index.js +11 -11
  85. package/lib/cjs/layout/Sider.d.ts +1 -1
  86. package/lib/cjs/layout/Sider.js +4 -4
  87. package/lib/cjs/layout/index.js +3 -3
  88. package/lib/cjs/list/index.js +11 -11
  89. package/lib/cjs/list/item.js +6 -6
  90. package/lib/cjs/modal/ConfirmModal.js +7 -7
  91. package/lib/cjs/modal/Modal.js +4 -4
  92. package/lib/cjs/modal/ModalContent.js +24 -24
  93. package/lib/cjs/modal/useModal/index.js +1 -1
  94. package/lib/cjs/navigation/CollapseButton.js +1 -1
  95. package/lib/cjs/navigation/Footer.js +2 -2
  96. package/lib/cjs/navigation/Header.js +5 -5
  97. package/lib/cjs/navigation/Item.js +16 -16
  98. package/lib/cjs/navigation/SubNav.js +14 -14
  99. package/lib/cjs/navigation/index.js +8 -8
  100. package/lib/cjs/notification/index.js +3 -3
  101. package/lib/cjs/notification/notice.js +12 -12
  102. package/lib/cjs/overflowList/index.d.ts +1 -1
  103. package/lib/cjs/overflowList/index.js +32 -35
  104. package/lib/cjs/overflowList/intersectionObserver.js +3 -1
  105. package/lib/cjs/pagination/index.js +26 -26
  106. package/lib/cjs/popconfirm/index.js +9 -9
  107. package/lib/cjs/popover/index.js +2 -2
  108. package/lib/cjs/progress/index.js +14 -14
  109. package/lib/cjs/radio/radio.js +22 -22
  110. package/lib/cjs/radio/radioGroup.js +5 -5
  111. package/lib/cjs/radio/radioInner.js +7 -7
  112. package/lib/cjs/rating/index.js +5 -5
  113. package/lib/cjs/rating/item.js +11 -11
  114. package/lib/cjs/scrollList/index.js +5 -5
  115. package/lib/cjs/scrollList/scrollItem.js +13 -13
  116. package/lib/cjs/select/index.d.ts +11 -0
  117. package/lib/cjs/select/index.js +297 -116
  118. package/lib/cjs/select/option.js +7 -7
  119. package/lib/cjs/sideSheet/SideSheetContent.js +10 -10
  120. package/lib/cjs/sideSheet/index.js +7 -7
  121. package/lib/cjs/skeleton/index.js +1 -1
  122. package/lib/cjs/skeleton/item.js +4 -4
  123. package/lib/cjs/slider/index.js +28 -28
  124. package/lib/cjs/space/index.js +12 -12
  125. package/lib/cjs/spin/icon.js +2 -2
  126. package/lib/cjs/spin/index.js +6 -6
  127. package/lib/cjs/steps/basicStep.js +14 -14
  128. package/lib/cjs/steps/basicSteps.js +6 -6
  129. package/lib/cjs/steps/fillStep.js +10 -10
  130. package/lib/cjs/steps/fillSteps.js +4 -4
  131. package/lib/cjs/steps/navStep.js +5 -5
  132. package/lib/cjs/steps/navSteps.js +2 -2
  133. package/lib/cjs/table/Body/BaseRow.js +5 -5
  134. package/lib/cjs/table/Body/ExpandedRow.js +3 -3
  135. package/lib/cjs/table/Body/SectionRow.js +1 -1
  136. package/lib/cjs/table/Body/index.js +8 -8
  137. package/lib/cjs/table/ColGroup.js +2 -2
  138. package/lib/cjs/table/ColumnFilter.js +3 -3
  139. package/lib/cjs/table/ColumnSelection.js +2 -2
  140. package/lib/cjs/table/ColumnSorter.js +7 -7
  141. package/lib/cjs/table/CustomExpandIcon.js +2 -2
  142. package/lib/cjs/table/HeadTable.js +3 -3
  143. package/lib/cjs/table/Table.js +20 -20
  144. package/lib/cjs/table/TableCell.js +8 -8
  145. package/lib/cjs/table/TableHeader.js +1 -1
  146. package/lib/cjs/table/TableHeaderRow.js +8 -8
  147. package/lib/cjs/table/TablePagination.js +3 -3
  148. package/lib/cjs/tabs/TabBar.js +31 -49
  149. package/lib/cjs/tabs/TabItem.d.ts +18 -0
  150. package/lib/cjs/tabs/TabItem.js +95 -0
  151. package/lib/cjs/tabs/TabPane.js +3 -3
  152. package/lib/cjs/tabs/index.d.ts +2 -1
  153. package/lib/cjs/tabs/index.js +5 -2
  154. package/lib/cjs/tag/group.js +5 -5
  155. package/lib/cjs/tag/index.js +13 -13
  156. package/lib/cjs/tagInput/index.d.ts +6 -2
  157. package/lib/cjs/tagInput/index.js +37 -34
  158. package/lib/cjs/timePicker/Combobox.js +4 -4
  159. package/lib/cjs/timePicker/TimeInput.js +4 -4
  160. package/lib/cjs/timePicker/TimePicker.js +8 -8
  161. package/lib/cjs/timeline/index.js +8 -8
  162. package/lib/cjs/timeline/item.js +7 -7
  163. package/lib/cjs/toast/index.js +5 -5
  164. package/lib/cjs/toast/toast.js +9 -9
  165. package/lib/cjs/tooltip/index.js +7 -7
  166. package/lib/cjs/transfer/index.js +31 -31
  167. package/lib/cjs/tree/autoSizer.js +1 -1
  168. package/lib/cjs/tree/index.js +6 -6
  169. package/lib/cjs/tree/interface.d.ts +1 -0
  170. package/lib/cjs/tree/nodeList.js +1 -1
  171. package/lib/cjs/tree/treeNode.js +26 -26
  172. package/lib/cjs/treeSelect/index.js +41 -41
  173. package/lib/cjs/typography/base.js +14 -14
  174. package/lib/cjs/typography/copyable.js +3 -3
  175. package/lib/cjs/typography/paragraph.js +1 -1
  176. package/lib/cjs/typography/title.js +1 -1
  177. package/lib/cjs/typography/util.js +1 -1
  178. package/lib/cjs/upload/fileCard.js +32 -32
  179. package/lib/cjs/upload/index.js +37 -37
  180. package/lib/es/_portal/index.js +2 -2
  181. package/lib/es/_utils/index.js +3 -1
  182. package/lib/es/anchor/index.js +9 -9
  183. package/lib/es/anchor/link.js +8 -8
  184. package/lib/es/autoComplete/index.js +8 -4
  185. package/lib/es/autoComplete/option.js +7 -7
  186. package/lib/es/avatar/avatarGroup.js +7 -7
  187. package/lib/es/avatar/index.js +12 -12
  188. package/lib/es/badge/index.js +8 -8
  189. package/lib/es/banner/index.js +12 -12
  190. package/lib/es/breadcrumb/index.js +12 -12
  191. package/lib/es/breadcrumb/item.js +8 -8
  192. package/lib/es/button/Button.js +9 -9
  193. package/lib/es/button/buttonGroup.js +5 -5
  194. package/lib/es/button/splitButtonGroup.js +1 -1
  195. package/lib/es/calendar/dayCalendar.js +13 -13
  196. package/lib/es/calendar/dayCol.js +17 -17
  197. package/lib/es/calendar/monthCalendar.js +38 -38
  198. package/lib/es/calendar/rangeCalendar.js +27 -27
  199. package/lib/es/calendar/timeCol.js +6 -6
  200. package/lib/es/calendar/weekCalendar.js +27 -27
  201. package/lib/es/card/cardGroup.js +2 -2
  202. package/lib/es/card/index.js +16 -16
  203. package/lib/es/card/meta.js +5 -5
  204. package/lib/es/carousel/CarouselArrow.js +6 -6
  205. package/lib/es/carousel/CarouselIndicator.js +6 -6
  206. package/lib/es/carousel/index.js +12 -12
  207. package/lib/es/cascader/index.d.ts +5 -2
  208. package/lib/es/cascader/index.js +40 -38
  209. package/lib/es/cascader/item.d.ts +15 -1
  210. package/lib/es/cascader/item.js +64 -32
  211. package/lib/es/checkbox/checkbox.js +14 -14
  212. package/lib/es/checkbox/checkboxGroup.js +4 -4
  213. package/lib/es/checkbox/checkboxInner.js +6 -6
  214. package/lib/es/collapse/item.js +9 -9
  215. package/lib/es/collapsible/index.js +3 -3
  216. package/lib/es/configProvider/index.js +1 -1
  217. package/lib/es/datePicker/dateInput.js +16 -16
  218. package/lib/es/datePicker/datePicker.js +9 -9
  219. package/lib/es/datePicker/footer.js +1 -1
  220. package/lib/es/datePicker/index.js +1 -1
  221. package/lib/es/datePicker/month.js +2 -2
  222. package/lib/es/datePicker/monthsGrid.js +27 -27
  223. package/lib/es/datePicker/navigation.js +1 -1
  224. package/lib/es/datePicker/quickControl.js +14 -14
  225. package/lib/es/datePicker/yearAndMonth.js +4 -4
  226. package/lib/es/descriptions/index.js +3 -3
  227. package/lib/es/descriptions/item.js +5 -5
  228. package/lib/es/divider/index.js +7 -7
  229. package/lib/es/dropdown/dropdownDivider.js +1 -1
  230. package/lib/es/dropdown/dropdownItem.js +7 -7
  231. package/lib/es/dropdown/dropdownMenu.js +1 -1
  232. package/lib/es/dropdown/dropdownTitle.js +2 -2
  233. package/lib/es/dropdown/index.js +3 -3
  234. package/lib/es/empty/index.js +7 -7
  235. package/lib/es/form/arrayField.js +1 -1
  236. package/lib/es/form/baseForm.d.ts +2 -0
  237. package/lib/es/form/baseForm.js +2 -2
  238. package/lib/es/form/errorMessage.js +1 -1
  239. package/lib/es/form/field.d.ts +2 -0
  240. package/lib/es/form/group.js +2 -2
  241. package/lib/es/form/hoc/withField.js +16 -16
  242. package/lib/es/form/label.js +9 -9
  243. package/lib/es/form/slot.js +5 -5
  244. package/lib/es/grid/col.js +11 -11
  245. package/lib/es/grid/row.js +4 -4
  246. package/lib/es/highlight/index.js +1 -1
  247. package/lib/es/iconButton/index.js +5 -5
  248. package/lib/es/image/image.js +10 -10
  249. package/lib/es/image/preview.js +3 -3
  250. package/lib/es/image/previewFooter.js +12 -12
  251. package/lib/es/image/previewHeader.js +3 -3
  252. package/lib/es/image/previewImage.js +7 -7
  253. package/lib/es/image/previewInner.js +7 -7
  254. package/lib/es/input/index.js +38 -38
  255. package/lib/es/input/inputGroup.js +7 -7
  256. package/lib/es/input/textarea.js +14 -14
  257. package/lib/es/inputNumber/index.js +11 -11
  258. package/lib/es/layout/Sider.d.ts +1 -1
  259. package/lib/es/layout/Sider.js +4 -4
  260. package/lib/es/layout/index.js +3 -3
  261. package/lib/es/list/index.js +11 -11
  262. package/lib/es/list/item.js +6 -6
  263. package/lib/es/modal/ConfirmModal.js +7 -7
  264. package/lib/es/modal/Modal.js +4 -4
  265. package/lib/es/modal/ModalContent.js +24 -24
  266. package/lib/es/modal/useModal/index.js +1 -1
  267. package/lib/es/navigation/CollapseButton.js +1 -1
  268. package/lib/es/navigation/Footer.js +2 -2
  269. package/lib/es/navigation/Header.js +5 -5
  270. package/lib/es/navigation/Item.js +16 -16
  271. package/lib/es/navigation/SubNav.js +14 -14
  272. package/lib/es/navigation/index.js +8 -8
  273. package/lib/es/notification/index.js +3 -3
  274. package/lib/es/notification/notice.js +12 -12
  275. package/lib/es/overflowList/index.d.ts +1 -1
  276. package/lib/es/overflowList/index.js +31 -35
  277. package/lib/es/overflowList/intersectionObserver.js +2 -1
  278. package/lib/es/pagination/index.js +26 -26
  279. package/lib/es/popconfirm/index.js +9 -9
  280. package/lib/es/popover/index.js +2 -2
  281. package/lib/es/progress/index.js +14 -14
  282. package/lib/es/radio/radio.js +22 -22
  283. package/lib/es/radio/radioGroup.js +5 -5
  284. package/lib/es/radio/radioInner.js +7 -7
  285. package/lib/es/rating/index.js +5 -5
  286. package/lib/es/rating/item.js +11 -11
  287. package/lib/es/scrollList/index.js +5 -5
  288. package/lib/es/scrollList/scrollItem.js +13 -13
  289. package/lib/es/select/index.d.ts +11 -0
  290. package/lib/es/select/index.js +288 -112
  291. package/lib/es/select/option.js +7 -7
  292. package/lib/es/sideSheet/SideSheetContent.js +10 -10
  293. package/lib/es/sideSheet/index.js +7 -7
  294. package/lib/es/skeleton/index.js +1 -1
  295. package/lib/es/skeleton/item.js +4 -4
  296. package/lib/es/slider/index.js +28 -28
  297. package/lib/es/space/index.js +12 -12
  298. package/lib/es/spin/icon.js +2 -2
  299. package/lib/es/spin/index.js +6 -6
  300. package/lib/es/steps/basicStep.js +14 -14
  301. package/lib/es/steps/basicSteps.js +6 -6
  302. package/lib/es/steps/fillStep.js +10 -10
  303. package/lib/es/steps/fillSteps.js +4 -4
  304. package/lib/es/steps/navStep.js +5 -5
  305. package/lib/es/steps/navSteps.js +2 -2
  306. package/lib/es/table/Body/BaseRow.js +5 -5
  307. package/lib/es/table/Body/ExpandedRow.js +3 -3
  308. package/lib/es/table/Body/SectionRow.js +1 -1
  309. package/lib/es/table/Body/index.js +8 -8
  310. package/lib/es/table/ColGroup.js +2 -2
  311. package/lib/es/table/ColumnFilter.js +3 -3
  312. package/lib/es/table/ColumnSelection.js +2 -2
  313. package/lib/es/table/ColumnSorter.js +7 -7
  314. package/lib/es/table/CustomExpandIcon.js +2 -2
  315. package/lib/es/table/HeadTable.js +3 -3
  316. package/lib/es/table/Table.js +20 -20
  317. package/lib/es/table/TableCell.js +8 -8
  318. package/lib/es/table/TableHeader.js +1 -1
  319. package/lib/es/table/TableHeaderRow.js +8 -8
  320. package/lib/es/table/TablePagination.js +3 -3
  321. package/lib/es/tabs/TabBar.js +30 -50
  322. package/lib/es/tabs/TabItem.d.ts +18 -0
  323. package/lib/es/tabs/TabItem.js +78 -0
  324. package/lib/es/tabs/TabPane.js +3 -3
  325. package/lib/es/tabs/index.d.ts +2 -1
  326. package/lib/es/tabs/index.js +4 -2
  327. package/lib/es/tag/group.js +5 -5
  328. package/lib/es/tag/index.js +13 -13
  329. package/lib/es/tagInput/index.d.ts +6 -2
  330. package/lib/es/tagInput/index.js +37 -34
  331. package/lib/es/timePicker/Combobox.js +4 -4
  332. package/lib/es/timePicker/TimeInput.js +4 -4
  333. package/lib/es/timePicker/TimePicker.js +8 -8
  334. package/lib/es/timeline/index.js +8 -8
  335. package/lib/es/timeline/item.js +7 -7
  336. package/lib/es/toast/index.js +5 -5
  337. package/lib/es/toast/toast.js +9 -9
  338. package/lib/es/tooltip/index.js +7 -7
  339. package/lib/es/transfer/index.js +31 -31
  340. package/lib/es/tree/autoSizer.js +1 -1
  341. package/lib/es/tree/index.js +6 -6
  342. package/lib/es/tree/interface.d.ts +1 -0
  343. package/lib/es/tree/nodeList.js +1 -1
  344. package/lib/es/tree/treeNode.js +26 -26
  345. package/lib/es/treeSelect/index.js +41 -41
  346. package/lib/es/typography/base.js +14 -14
  347. package/lib/es/typography/copyable.js +3 -3
  348. package/lib/es/typography/paragraph.js +1 -1
  349. package/lib/es/typography/title.js +1 -1
  350. package/lib/es/typography/util.js +1 -1
  351. package/lib/es/upload/fileCard.js +32 -32
  352. package/lib/es/upload/index.js +37 -37
  353. package/package.json +8 -8
@@ -89,14 +89,14 @@ export default class TableExpandedRow extends PureComponent {
89
89
  render: () => ({
90
90
  props,
91
91
  children: /*#__PURE__*/React.createElement("div", {
92
- className: classnames("".concat(prefixCls, "-expand-inner")),
92
+ className: classnames(`${prefixCls}-expand-inner`),
93
93
  style: {
94
94
  width: anyColumnFixed ? amendTableWidth(tableWidth) : undefined
95
95
  }
96
96
  }, children)
97
97
  })
98
98
  }, column)];
99
- const rowCls = classnames(className, "".concat(prefixCls, "-row-expand"));
99
+ const rowCls = classnames(className, `${prefixCls}-row-expand`);
100
100
  const baseRowCellWidths = getCellWidths(columns);
101
101
  return /*#__PURE__*/React.createElement(TableRow, {
102
102
  style: style,
@@ -104,7 +104,7 @@ export default class TableExpandedRow extends PureComponent {
104
104
  className: rowCls,
105
105
  expandedRow: true,
106
106
  renderExpandIcon: renderExpandIcon,
107
- rowKey: "".concat(record.key, "-expanded-row"),
107
+ rowKey: `${record.key}-expanded-row`,
108
108
  columns: columns,
109
109
  store: store,
110
110
  virtualized: virtualized,
@@ -145,7 +145,7 @@ class SectionRow extends PureComponent {
145
145
  children
146
146
  })
147
147
  }, column)];
148
- const rowCls = classnames(className, "".concat(prefixCls, "-row-section"), {
148
+ const rowCls = classnames(className, `${prefixCls}-row-section`, {
149
149
  on: expanded
150
150
  });
151
151
  const {
@@ -87,7 +87,7 @@ class Body extends BaseComponent {
87
87
  }
88
88
 
89
89
  if (realSize < defaultConfig.minHeight) {
90
- logger.warn("The computed real `itemSize` cannot be less than ".concat(defaultConfig.minHeight));
90
+ logger.warn(`The computed real \`itemSize\` cannot be less than ${defaultConfig.minHeight}`);
91
91
  }
92
92
 
93
93
  return realSize;
@@ -201,7 +201,7 @@ class Body extends BaseComponent {
201
201
  }
202
202
  },
203
203
  // eslint-disable-next-line react/no-this-in-sfc,react/destructuring-assignment
204
- className: classnames(props.className, "".concat(_this.props.prefixCls, "-tbody")),
204
+ className: classnames(props.className, `${_this.props.prefixCls}-tbody`),
205
205
  style: Object.assign({}, props.style),
206
206
  ref: ref
207
207
  }));
@@ -222,7 +222,7 @@ class Body extends BaseComponent {
222
222
  } = this.props; // eslint-disable-next-line react/no-this-in-sfc
223
223
 
224
224
  const tableWidth = this.getVirtualizedRowWidth();
225
- const tableCls = classnames("".concat(prefixCls), "".concat(prefixCls, "-fixed"));
225
+ const tableCls = classnames(`${prefixCls}`, `${prefixCls}-fixed`);
226
226
  return /*#__PURE__*/React.createElement("div", Object.assign({}, rest, {
227
227
  ref: ref,
228
228
  onWheel: function () {
@@ -291,7 +291,7 @@ class Body extends BaseComponent {
291
291
  overflowX: 'auto',
292
292
  overflowY: 'auto'
293
293
  };
294
- const wrapCls = classnames("".concat(prefixCls, "-body"));
294
+ const wrapCls = classnames(`${prefixCls}-body`);
295
295
  return /*#__PURE__*/React.createElement(List, Object.assign({}, typeof virtualized === 'object' ? virtualized : {}, {
296
296
  initialScrollOffset: this.state.cache.virtualizedScrollTop,
297
297
  onScroll: this.handleVirtualizedScroll,
@@ -516,7 +516,7 @@ class Body extends BaseComponent {
516
516
  prefixCls: prefixCls
517
517
  }); // const tableBody = this.renderBody();
518
518
 
519
- const wrapCls = "".concat(prefixCls, "-body");
519
+ const wrapCls = `${prefixCls}-body`;
520
520
  const baseTable = /*#__PURE__*/React.createElement("div", {
521
521
  key: "bodyTable",
522
522
  className: wrapCls,
@@ -532,21 +532,21 @@ class Body extends BaseComponent {
532
532
  "aria-colcount": columns && columns.length,
533
533
  style: tableStyle,
534
534
  className: classnames(prefixCls, {
535
- ["".concat(prefixCls, "-fixed")]: anyColumnFixed
535
+ [`${prefixCls}-fixed`]: anyColumnFixed
536
536
  })
537
537
  }, colgroup, includeHeader && showHeader ? /*#__PURE__*/React.createElement(TableHeader, Object.assign({}, this.props, {
538
538
  ref: headerRef,
539
539
  components: components,
540
540
  columns: columns
541
541
  })) : null, /*#__PURE__*/React.createElement(BodyWrapper, {
542
- className: "".concat(prefixCls, "-tbody"),
542
+ className: `${prefixCls}-tbody`,
543
543
  onScroll: onScroll
544
544
  }, _isMap(groups) ? this.renderGroupedRows() : this.renderBodyRows(dataSource))), emptySlot);
545
545
 
546
546
  if (fixed && columns.length) {
547
547
  return /*#__PURE__*/React.createElement("div", {
548
548
  key: "bodyTable",
549
- className: "".concat(prefixCls, "-body-outer")
549
+ className: `${prefixCls}-body-outer`
550
550
  }, baseTable);
551
551
  }
552
552
 
@@ -30,12 +30,12 @@ export default class ColGroup extends React.PureComponent {
30
30
  }
31
31
 
32
32
  return /*#__PURE__*/React.createElement(Col, {
33
- className: classnames("".concat(prefixCls, "-col"), column.className),
33
+ className: classnames(`${prefixCls}-col`, column.className),
34
34
  key: column.key || column.dataIndex || idx,
35
35
  style: colStyle
36
36
  });
37
37
  });
38
- const groupCls = classnames("".concat(prefixCls, "-colgroup"), className);
38
+ const groupCls = classnames(`${prefixCls}-colgroup`, className);
39
39
  return /*#__PURE__*/React.createElement(ColGroup, {
40
40
  className: groupCls,
41
41
  style: style
@@ -69,7 +69,7 @@ function renderDropdown() {
69
69
  const {
70
70
  value
71
71
  } = filter;
72
- const key = "".concat(level, "_").concat(index);
72
+ const key = `${level}_${index}`;
73
73
  const dropdownItem = typeof renderFilterDropdownItem === 'function' ? renderFilterDropdownItem({
74
74
  onChange: changeFn,
75
75
  filterMultiple,
@@ -109,7 +109,7 @@ function renderDropdown() {
109
109
  }
110
110
 
111
111
  return /*#__PURE__*/React.createElement(Dropdown, Object.assign({}, dropdownProps, {
112
- key: "Dropdown_level_".concat(level)
112
+ key: `Dropdown_level_${level}`
113
113
  }), nestedElem);
114
114
  }
115
115
 
@@ -125,7 +125,7 @@ export default function ColumnFilter() {
125
125
  let {
126
126
  filterDropdown = null
127
127
  } = props;
128
- const finalCls = cls("".concat(prefixCls, "-column-filter"), {
128
+ const finalCls = cls(`${prefixCls}-column-filter`, {
129
129
  on: Array.isArray(filteredValue) && filteredValue.length
130
130
  });
131
131
  let iconElem;
@@ -52,8 +52,8 @@ export default class TableSelectionCell extends BaseComponent {
52
52
  checkboxProps = Object.assign(Object.assign({}, checkboxProps), getCheckboxProps());
53
53
  }
54
54
 
55
- const wrapCls = classnames("".concat(prefixCls, "-selection-wrap"), {
56
- ["".concat(prefixCls, "-selection-disabled")]: disabled
55
+ const wrapCls = classnames(`${prefixCls}-selection-wrap`, {
56
+ [`${prefixCls}-selection-disabled`]: disabled
57
57
  }, className);
58
58
  return /*#__PURE__*/React.createElement("span", {
59
59
  className: wrapCls
@@ -15,10 +15,10 @@ export default class ColumnSorter extends PureComponent {
15
15
  title
16
16
  } = this.props;
17
17
  const iconBtnSize = 'default';
18
- const upCls = cls("".concat(prefixCls, "-column-sorter-up"), {
18
+ const upCls = cls(`${prefixCls}-column-sorter-up`, {
19
19
  on: sortOrder === strings.SORT_DIRECTIONS[0]
20
20
  });
21
- const downCls = cls("".concat(prefixCls, "-column-sorter-down"), {
21
+ const downCls = cls(`${prefixCls}-column-sorter-down`, {
22
22
  on: sortOrder === strings.SORT_DIRECTIONS[1]
23
23
  });
24
24
  const ariaProps = {
@@ -26,25 +26,25 @@ export default class ColumnSorter extends PureComponent {
26
26
  * Set 'aria-sort' to aria-columnheader is difficult, so set 'aria-label' about sort info to sorter
27
27
  * reference: https://developer.mozilla.org/en-US/docs/Web/API/Element/ariaSort
28
28
  */
29
- 'aria-label': "Current sort order is ".concat(sortOrder ? "".concat(sortOrder, "ing") : 'none'),
29
+ 'aria-label': `Current sort order is ${sortOrder ? `${sortOrder}ing` : 'none'}`,
30
30
  'aria-roledescription': 'Sort data with this column'
31
31
  };
32
32
  return /*#__PURE__*/React.createElement("div", Object.assign({
33
33
  role: 'button'
34
34
  }, ariaProps, {
35
35
  tabIndex: -1,
36
- className: "".concat(prefixCls, "-column-sorter-wrapper"),
36
+ className: `${prefixCls}-column-sorter-wrapper`,
37
37
  onClick: onClick,
38
38
  onKeyPress: e => isEnterPress(e) && onClick(e)
39
39
  }), title, /*#__PURE__*/React.createElement("div", {
40
40
  style: style,
41
- className: "".concat(prefixCls, "-column-sorter")
41
+ className: `${prefixCls}-column-sorter`
42
42
  }, /*#__PURE__*/React.createElement("span", {
43
- className: "".concat(upCls)
43
+ className: `${upCls}`
44
44
  }, /*#__PURE__*/React.createElement(IconCaretup, {
45
45
  size: iconBtnSize
46
46
  })), /*#__PURE__*/React.createElement("span", {
47
- className: "".concat(downCls)
47
+ className: `${downCls}`
48
48
  }, /*#__PURE__*/React.createElement(IconCaretdown, {
49
49
  size: iconBtnSize
50
50
  }))));
@@ -48,7 +48,7 @@ export default function CustomExpandIcon(props) {
48
48
  const originIcon = icon;
49
49
  icon = /*#__PURE__*/React.createElement(CSSAnimation, {
50
50
  animationState: expanded ? "enter" : "leave",
51
- startClassName: "".concat(cssClasses.PREFIX, "-expandedIcon-").concat(expanded ? 'show' : "hide")
51
+ startClassName: `${cssClasses.PREFIX}-expandedIcon-${expanded ? 'show' : "hide"}`
52
52
  }, _ref => {
53
53
  let {
54
54
  animationClassName
@@ -66,7 +66,7 @@ export default function CustomExpandIcon(props) {
66
66
  onClick: handleClick,
67
67
  onMouseEnter: onMouseEnter,
68
68
  onMouseLeave: onMouseLeave,
69
- className: "".concat(prefixCls, "-expand-icon"),
69
+ className: `${prefixCls}-expand-icon`,
70
70
  onKeyPress: e => isEnterPress(e) && handleClick(e)
71
71
  }, icon);
72
72
  }
@@ -63,8 +63,8 @@ class HeadTable extends React.PureComponent {
63
63
  components: components,
64
64
  onDidUpdate: onDidUpdate
65
65
  }));
66
- const headTableCls = classnames("".concat(prefixCls, "-header"), {
67
- ["".concat(prefixCls, "-header-sticky")]: sticky
66
+ const headTableCls = classnames(`${prefixCls}-header`, {
67
+ [`${prefixCls}-header-sticky`]: sticky
68
68
  });
69
69
 
70
70
  const stickyTop = _get(sticky, 'top', 0);
@@ -82,7 +82,7 @@ class HeadTable extends React.PureComponent {
82
82
  }, /*#__PURE__*/React.createElement(Table, {
83
83
  style: tableStyle,
84
84
  className: classnames(prefixCls, {
85
- ["".concat(prefixCls, "-fixed")]: anyColumnFixed
85
+ [`${prefixCls}-fixed`]: anyColumnFixed
86
86
  })
87
87
  }, colgroup, tableHeader));
88
88
  }
@@ -248,17 +248,17 @@ class Table extends BaseComponent {
248
248
  const {
249
249
  prefixCls
250
250
  } = this.props;
251
- const positionAll = ["".concat(prefixCls, "-scroll-position-both"), "".concat(prefixCls, "-scroll-position-middle"), "".concat(prefixCls, "-scroll-position-left"), "".concat(prefixCls, "-scroll-position-right")];
251
+ const positionAll = [`${prefixCls}-scroll-position-both`, `${prefixCls}-scroll-position-middle`, `${prefixCls}-scroll-position-left`, `${prefixCls}-scroll-position-right`];
252
252
  this.scrollPosition = position;
253
253
  const tableNode = this.wrapRef.current;
254
254
 
255
255
  if (tableNode && tableNode.nodeType) {
256
256
  if (position === 'both') {
257
- const acceptPosition = ["".concat(prefixCls, "-scroll-position-left"), "".concat(prefixCls, "-scroll-position-right")];
257
+ const acceptPosition = [`${prefixCls}-scroll-position-left`, `${prefixCls}-scroll-position-right`];
258
258
  tableNode.classList.remove(..._difference(positionAll, acceptPosition));
259
259
  tableNode.classList.add(...acceptPosition);
260
260
  } else {
261
- const acceptPosition = ["".concat(prefixCls, "-scroll-position-").concat(position)];
261
+ const acceptPosition = [`${prefixCls}-scroll-position-${position}`];
262
262
  tableNode.classList.remove(..._difference(positionAll, acceptPosition));
263
263
  tableNode.classList.add(...acceptPosition);
264
264
  }
@@ -319,7 +319,7 @@ class Table extends BaseComponent {
319
319
  const hasRowSelected = _this.foundation.hasRowSelected(selectedRowKeys, allRowKeysSet);
320
320
 
321
321
  return /*#__PURE__*/React.createElement(ColumnSelection, {
322
- "aria-label": "".concat(allIsSelected ? 'Deselect' : 'Select', " all rows"),
322
+ "aria-label": `${allIsSelected ? 'Deselect' : 'Select'} all rows`,
323
323
  disabled: disabled,
324
324
  key: columnKey,
325
325
  selected: allIsSelected,
@@ -336,7 +336,7 @@ class Table extends BaseComponent {
336
336
  const checkboxPropsFn = () => typeof getCheckboxProps === 'function' ? getCheckboxProps(record) : {};
337
337
 
338
338
  return /*#__PURE__*/React.createElement(ColumnSelection, {
339
- "aria-label": "".concat(selected ? 'Deselect' : 'Select', " this row"),
339
+ "aria-label": `${selected ? 'Deselect' : 'Select'} this row`,
340
340
  getCheckboxProps: checkboxPropsFn,
341
341
  selected: selected,
342
342
  onChange: (status, e) => _this.toggleSelectRow(status, key, e)
@@ -372,7 +372,7 @@ class Table extends BaseComponent {
372
372
  column = Object.assign(Object.assign({}, column), _omit(rowSelection, needOmitSelectionKey));
373
373
  }
374
374
 
375
- column.className = classnames(column.className, "".concat(prefixCls, "-column-selection"));
375
+ column.className = classnames(column.className, `${prefixCls}-column-selection`);
376
376
  column.title = _this.renderTitleSelectionCallback;
377
377
  column.render = _this.renderRowSelectionCallback;
378
378
  }
@@ -438,7 +438,7 @@ class Table extends BaseComponent {
438
438
  fixed: expandCellFixed,
439
439
  key: strings.DEFAULT_KEY_COLUMN_EXPAND
440
440
  };
441
- column.className = classnames(column.className, "".concat(prefixCls, "-column-expand"));
441
+ column.className = classnames(column.className, `${prefixCls}-column-expand`);
442
442
  column.render = expandIcon !== false ? function () {
443
443
  let text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
444
444
  let record = arguments.length > 1 ? arguments[1] : undefined;
@@ -572,7 +572,7 @@ class Table extends BaseComponent {
572
572
  }
573
573
 
574
574
  return /*#__PURE__*/isValidElement(title) || typeof title === 'string' ? /*#__PURE__*/React.createElement("div", {
575
- className: "".concat(prefixCls, "-title"),
575
+ className: `${prefixCls}-title`,
576
576
  "x-semi-prop": "title"
577
577
  }, title) : null;
578
578
  };
@@ -584,7 +584,7 @@ class Table extends BaseComponent {
584
584
  empty,
585
585
  dataSource
586
586
  } = props;
587
- const wrapCls = "".concat(prefixCls, "-placeholder");
587
+ const wrapCls = `${prefixCls}-placeholder`;
588
588
 
589
589
  const isEmpty = _this.foundation.isEmpty(dataSource);
590
590
 
@@ -598,7 +598,7 @@ class Table extends BaseComponent {
598
598
  }, (locale, localeCode) => /*#__PURE__*/React.createElement("div", {
599
599
  className: wrapCls
600
600
  }, /*#__PURE__*/React.createElement("div", {
601
- className: "".concat(prefixCls, "-empty"),
601
+ className: `${prefixCls}-empty`,
602
602
  "x-semi-prop": "empty"
603
603
  }, empty || locale.emptyText)));
604
604
  };
@@ -618,7 +618,7 @@ class Table extends BaseComponent {
618
618
  }
619
619
 
620
620
  return /*#__PURE__*/isValidElement(footer) || typeof footer === 'string' ? /*#__PURE__*/React.createElement("div", {
621
- className: "".concat(prefixCls, "-footer"),
621
+ className: `${prefixCls}-footer`,
622
622
  key: "footer",
623
623
  "x-semi-prop": "footer"
624
624
  }, footer) : null;
@@ -1432,13 +1432,13 @@ class Table extends BaseComponent {
1432
1432
  }
1433
1433
 
1434
1434
  const wrapCls = classnames({
1435
- ["".concat(prefixCls, "-").concat(strings.SIZE_SMALL)]: size === strings.SIZE_SMALL,
1436
- ["".concat(prefixCls, "-").concat(strings.SIZE_MIDDLE)]: size === strings.SIZE_MIDDLE,
1437
- ["".concat(prefixCls, "-virtualized")]: Boolean(virtualized),
1438
- ["".concat(prefixCls, "-bordered")]: bordered,
1439
- ["".concat(prefixCls, "-fixed-header")]: Boolean(y),
1440
- ["".concat(prefixCls, "-scroll-position-left")]: ['both', 'left'].includes(this.position),
1441
- ["".concat(prefixCls, "-scroll-position-right")]: ['both', 'right'].includes(this.position)
1435
+ [`${prefixCls}-${strings.SIZE_SMALL}`]: size === strings.SIZE_SMALL,
1436
+ [`${prefixCls}-${strings.SIZE_MIDDLE}`]: size === strings.SIZE_MIDDLE,
1437
+ [`${prefixCls}-virtualized`]: Boolean(virtualized),
1438
+ [`${prefixCls}-bordered`]: bordered,
1439
+ [`${prefixCls}-fixed-header`]: Boolean(y),
1440
+ [`${prefixCls}-scroll-position-left`]: ['both', 'left'].includes(this.position),
1441
+ [`${prefixCls}-scroll-position-right`]: ['both', 'right'].includes(this.position)
1442
1442
  }); // pagination
1443
1443
 
1444
1444
  const tablePagination = pagination && propPagination ? this.renderPagination(pagination, propRenderPagination) : null;
@@ -1461,7 +1461,7 @@ class Table extends BaseComponent {
1461
1461
  });
1462
1462
  return /*#__PURE__*/React.createElement("div", {
1463
1463
  ref: this.rootWrapRef,
1464
- className: classnames(className, "".concat(prefixCls, "-wrapper")),
1464
+ className: classnames(className, `${prefixCls}-wrapper`),
1465
1465
  "data-column-fixed": anyColumnFixed,
1466
1466
  style: wrapStyle,
1467
1467
  id: id
@@ -1478,7 +1478,7 @@ class Table extends BaseComponent {
1478
1478
  dataSource: props.dataSource,
1479
1479
  prefixCls: props.prefixCls
1480
1480
  }), /*#__PURE__*/React.createElement("div", {
1481
- className: "".concat(prefixCls, "-container")
1481
+ className: `${prefixCls}-container`
1482
1482
  }, this.renderMainTable(Object.assign({}, props))), /*#__PURE__*/React.createElement(React.Fragment, {
1483
1483
  key: 'pagination-bottom'
1484
1484
  }, ['bottom', 'both'].includes(paginationPosition) ? tablePagination : null)))));
@@ -191,9 +191,9 @@ export default class TableCell extends BaseComponent {
191
191
 
192
192
  const indentText = indent && indentSize ? /*#__PURE__*/React.createElement("span", {
193
193
  style: {
194
- paddingLeft: "".concat(indentSize * indent, "px")
194
+ paddingLeft: `${indentSize * indent}px`
195
195
  },
196
- className: "".concat(prefixCls, "-row-indent indent-level-").concat(indent)
196
+ className: `${prefixCls}-row-indent indent-level-${indent}`
197
197
  }) : null; // column.render
198
198
 
199
199
  const realExpandIcon = typeof renderExpandIcon === 'function' ? renderExpandIcon(record) : expandIcon;
@@ -265,7 +265,7 @@ export default class TableCell extends BaseComponent {
265
265
 
266
266
  if (isSection) {
267
267
  inner = /*#__PURE__*/React.createElement("div", {
268
- className: classnames("".concat(prefixCls, "-section-inner")),
268
+ className: classnames(`${prefixCls}-section-inner`),
269
269
  style: {
270
270
  width: anyColumnFixed ? amendTableWidth(tableWidth) : undefined
271
271
  }
@@ -316,11 +316,11 @@ export default class TableCell extends BaseComponent {
316
316
  }
317
317
 
318
318
  const inner = this.renderInner(text, indentText, realExpandIcon);
319
- const columnCls = classnames(className, "".concat(prefixCls, "-row-cell"), _get(customCellProps, 'className'), {
320
- ["".concat(prefixCls, "-cell-fixed-left")]: fixedLeftFlag,
321
- ["".concat(prefixCls, "-cell-fixed-left-last")]: lastFixedLeft,
322
- ["".concat(prefixCls, "-cell-fixed-right")]: fixedRightFlag,
323
- ["".concat(prefixCls, "-cell-fixed-right-first")]: firstFixedRight
319
+ const columnCls = classnames(className, `${prefixCls}-row-cell`, _get(customCellProps, 'className'), {
320
+ [`${prefixCls}-cell-fixed-left`]: fixedLeftFlag,
321
+ [`${prefixCls}-cell-fixed-left-last`]: lastFixedLeft,
322
+ [`${prefixCls}-cell-fixed-right`]: fixedRightFlag,
323
+ [`${prefixCls}-cell-fixed-right-first`]: firstFixedRight
324
324
  });
325
325
  return /*#__PURE__*/React.createElement(BodyCell, Object.assign({
326
326
  role: "gridcell",
@@ -113,7 +113,7 @@ class TableHeader extends BaseComponent {
113
113
  const rows = parseHeaderRows(columns);
114
114
  const HeaderWrapper = components.header.wrapper;
115
115
  return /*#__PURE__*/React.createElement(HeaderWrapper, {
116
- className: "".concat(prefixCls, "-thead"),
116
+ className: `${prefixCls}-thead`,
117
117
  ref: forwardedRef
118
118
  }, rows.map((row, idx) => /*#__PURE__*/React.createElement(TableHeaderRow, {
119
119
  prefixCls: prefixCls,
@@ -38,7 +38,7 @@ export default class TableHeaderRow extends BaseComponent {
38
38
  row,
39
39
  index
40
40
  } = this.props;
41
- const cellSelector = ".".concat(prefixCls, "-row-head");
41
+ const cellSelector = `.${prefixCls}-row-head`;
42
42
  const heads = node && node.querySelectorAll && node.querySelectorAll(cellSelector);
43
43
  this.context.setHeadWidths(_map(heads, (head, headIndex) => {
44
44
  let configWidth = _get(row, [headIndex, 'column', 'width']);
@@ -92,7 +92,7 @@ export default class TableHeaderRow extends BaseComponent {
92
92
 
93
93
  const rowProps = onHeaderRow(columns, index) || {};
94
94
 
95
- _set(rowProps, 'className', classnames(_get(rowProps, 'className'), "".concat(prefixCls, "-row")));
95
+ _set(rowProps, 'className', classnames(_get(rowProps, 'className'), `${prefixCls}-row`));
96
96
 
97
97
  const cells = _map(row, (cell, cellIndex) => {
98
98
  const {
@@ -108,16 +108,16 @@ export default class TableHeaderRow extends BaseComponent {
108
108
  textAlign: column.align
109
109
  });
110
110
  customProps.className = classnames(customProps.className, column.className, {
111
- ["".concat(prefixCls, "-align-").concat(column.align)]: Boolean(column.align)
111
+ [`${prefixCls}-align-${column.align}`]: Boolean(column.align)
112
112
  });
113
113
  }
114
114
 
115
- customProps.className = classnames("".concat(prefixCls, "-row-head"), column.className, customProps.className, // `${prefixCls}-fixed-columns`,
115
+ customProps.className = classnames(`${prefixCls}-row-head`, column.className, customProps.className, // `${prefixCls}-fixed-columns`,
116
116
  {
117
- ["".concat(prefixCls, "-cell-fixed-left")]: isFixedLeft(column),
118
- ["".concat(prefixCls, "-cell-fixed-left-last")]: isLastLeftFixed(slicedColumns, column),
119
- ["".concat(prefixCls, "-cell-fixed-right")]: isFixedRight(column),
120
- ["".concat(prefixCls, "-cell-fixed-right-first")]: isFirstFixedRight(slicedColumns, column)
117
+ [`${prefixCls}-cell-fixed-left`]: isFixedLeft(column),
118
+ [`${prefixCls}-cell-fixed-left-last`]: isLastLeftFixed(slicedColumns, column),
119
+ [`${prefixCls}-cell-fixed-right`]: isFixedRight(column),
120
+ [`${prefixCls}-cell-fixed-right-first`]: isFirstFixedRight(slicedColumns, column)
121
121
  });
122
122
 
123
123
  if (headWidths.length && slicedColumns.length) {
@@ -19,11 +19,11 @@ export default class TablePagination extends PureComponent {
19
19
 
20
20
  const customPagination = renderPagination && _isFunction(renderPagination) ? renderPagination(pagination) : null;
21
21
  return /*#__PURE__*/React.createElement("div", {
22
- className: "".concat(prefixCls, "-pagination-outer")
22
+ className: `${prefixCls}-pagination-outer`
23
23
  }, /*#__PURE__*/isValidElement(customPagination) ? customPagination : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
24
- className: "".concat(prefixCls, "-pagination-info")
24
+ className: `${prefixCls}-pagination-info`
25
25
  }, info), /*#__PURE__*/React.createElement("span", {
26
- className: "".concat(prefixCls, "-pagination-wrapper")
26
+ className: `${prefixCls}-pagination-wrapper`
27
27
  }, total > 0 ? /*#__PURE__*/React.createElement(Pagination, Object.assign({}, pagination, {
28
28
  key: _get(pagination, 'pageSize', 'pagination')
29
29
  })) : null)));
@@ -1,3 +1,4 @@
1
+ import _pick from "lodash/pick";
1
2
  import _isEmpty from "lodash/isEmpty";
2
3
 
3
4
  var __rest = this && this.__rest || function (s, e) {
@@ -19,8 +20,9 @@ import getDataAttr from '@douyinfe/semi-foundation/lib/es/utils/getDataAttr';
19
20
  import OverflowList from '../overflowList';
20
21
  import Dropdown from '../dropdown';
21
22
  import Button from '../button';
22
- import { IconChevronRight, IconChevronLeft, IconClose } from '@douyinfe/semi-icons';
23
+ import { IconChevronRight, IconChevronLeft } from '@douyinfe/semi-icons';
23
24
  import { getUuidv4 } from '@douyinfe/semi-foundation/lib/es/utils/uuid';
25
+ import TabItem from './TabItem';
24
26
 
25
27
  class TabBar extends React.Component {
26
28
  constructor(props) {
@@ -33,7 +35,7 @@ class TabBar extends React.Component {
33
35
  const key = this._getItemKey(itemKey); // eslint-disable-next-line max-len
34
36
 
35
37
 
36
- const tabItem = document.querySelector("[data-uuid=\"".concat(this.state.uuid, "\"] .").concat(cssClasses.TABS_TAB, "[data-scrollkey=\"").concat(key, "\"]"));
38
+ const tabItem = document.querySelector(`[data-uuid="${this.state.uuid}"] .${cssClasses.TABS_TAB}[data-scrollkey="${key}"]`);
37
39
  tabItem.scrollIntoView({
38
40
  behavior: 'smooth',
39
41
  block: 'nearest',
@@ -50,45 +52,23 @@ class TabBar extends React.Component {
50
52
  const {
51
53
  size,
52
54
  type,
53
- deleteTabItem
55
+ deleteTabItem,
56
+ handleKeyDown,
57
+ tabPosition
54
58
  } = this.props;
55
- const panelIcon = panel.icon ? this.renderIcon(panel.icon) : null;
56
- const closableIcon = type === 'card' && panel.closable ? /*#__PURE__*/React.createElement(IconClose, {
57
- "aria-label": "Close",
58
- role: "button",
59
- className: "".concat(cssClasses.TABS_TAB, "-icon-close"),
60
- onClick: e => deleteTabItem(panel.itemKey, e)
61
- }) : null;
62
- let events = {};
63
- const key = panel.itemKey;
64
-
65
- if (!panel.disabled) {
66
- events = {
67
- onClick: e => this.handleItemClick(key, e)
68
- };
69
- }
70
-
71
- const isSelected = this._isActive(key);
72
59
 
73
- const className = cls(cssClasses.TABS_TAB, {
74
- [cssClasses.TABS_TAB_ACTIVE]: isSelected,
75
- [cssClasses.TABS_TAB_DISABLED]: panel.disabled,
76
- ["".concat(cssClasses.TABS_TAB, "-small")]: size === 'small',
77
- ["".concat(cssClasses.TABS_TAB, "-medium")]: size === 'medium'
78
- });
79
- return /*#__PURE__*/React.createElement("div", Object.assign({
80
- role: "tab",
81
- id: "semiTab".concat(key),
82
- "data-tabkey": "semiTab".concat(key),
83
- "aria-controls": "semiTabPanel".concat(key),
84
- "aria-disabled": panel.disabled ? 'true' : 'false',
85
- "aria-selected": isSelected ? 'true' : 'false',
86
- tabIndex: isSelected ? 0 : -1,
87
- onKeyDown: e => this.handleKeyDown(e, key, panel.closable)
88
- }, events, {
89
- className: className,
90
- key: this._getItemKey(key)
91
- }), panelIcon, panel.tab, closableIcon);
60
+ const isSelected = this._isActive(panel.itemKey);
61
+
62
+ return /*#__PURE__*/React.createElement(TabItem, Object.assign({}, _pick(panel, ['disabled', 'icon', 'itemKey', 'tab', 'closable']), {
63
+ key: this._getItemKey(panel.itemKey),
64
+ selected: isSelected,
65
+ size: size,
66
+ type: type,
67
+ tabPosition: tabPosition,
68
+ handleKeyDown: handleKeyDown,
69
+ deleteTabItem: deleteTabItem,
70
+ onClick: this.handleItemClick
71
+ }));
92
72
  };
93
73
 
94
74
  this.renderTabComponents = list => list.map(panel => this.renderTabItem(panel));
@@ -103,7 +83,7 @@ class TabBar extends React.Component {
103
83
  const key = this._getItemKey(lastItem.itemKey); // eslint-disable-next-line max-len
104
84
 
105
85
 
106
- const tabItem = document.querySelector("[data-uuid=\"".concat(this.state.uuid, "\"] .").concat(cssClasses.TABS_TAB, "[data-scrollkey=\"").concat(key, "\"]"));
86
+ const tabItem = document.querySelector(`[data-uuid="${this.state.uuid}"] .${cssClasses.TABS_TAB}[data-scrollkey="${key}"]`);
107
87
  tabItem.scrollIntoView({
108
88
  behavior: 'smooth',
109
89
  block: 'nearest',
@@ -142,17 +122,17 @@ class TabBar extends React.Component {
142
122
  }, panelIcon, tab);
143
123
  }));
144
124
  const arrowCls = cls({
145
- ["".concat(cssClasses.TABS_BAR, "-arrow-").concat(pos)]: pos,
146
- ["".concat(cssClasses.TABS_BAR, "-arrow")]: true
125
+ [`${cssClasses.TABS_BAR}-arrow-${pos}`]: pos,
126
+ [`${cssClasses.TABS_BAR}-arrow`]: true
147
127
  });
148
128
  const dropdownCls = cls(dropdownClassName, {
149
- ["".concat(cssClasses.TABS_BAR, "-dropdown")]: true
129
+ [`${cssClasses.TABS_BAR}-dropdown`]: true
150
130
  });
151
131
  return /*#__PURE__*/React.createElement(Dropdown, {
152
132
  className: dropdownCls,
153
133
  clickToHide: true,
154
134
  clickTriggerToHide: true,
155
- key: "".concat(rePosKey, "-").concat(pos),
135
+ key: `${rePosKey}-${pos}`,
156
136
  position: pos === 'start' ? 'bottomLeft' : 'bottomRight',
157
137
  render: disabled ? null : menu,
158
138
  showTick: true,
@@ -195,14 +175,14 @@ class TabBar extends React.Component {
195
175
  items: renderedList,
196
176
  overflowRenderer: this.renderOverflow,
197
177
  renderMode: "scroll",
198
- className: "".concat(cssClasses.TABS_BAR, "-overflow-list"),
178
+ className: `${cssClasses.TABS_BAR}-overflow-list`,
199
179
  visibleItemRenderer: this.renderTabItem
200
180
  });
201
181
  };
202
182
 
203
183
  this._isActive = key => key === this.props.activeKey;
204
184
 
205
- this._getItemKey = key => "".concat(key, "-bar");
185
+ this._getItemKey = key => `${key}-bar`;
206
186
 
207
187
  this.state = {
208
188
  endInd: props.list.length,
@@ -233,8 +213,8 @@ class TabBar extends React.Component {
233
213
  };
234
214
  const tabBarExtraContentStyle = tabBarExtraContent && tabBarExtraContent.props ? tabBarExtraContent.props.style : {};
235
215
  const extraCls = cls(cssClasses.TABS_BAR_EXTRA, {
236
- ["".concat(cssClasses.TABS_BAR, "-").concat(type, "-extra")]: type,
237
- ["".concat(cssClasses.TABS_BAR, "-").concat(type, "-extra-").concat(size)]: size
216
+ [`${cssClasses.TABS_BAR}-${type}-extra`]: type,
217
+ [`${cssClasses.TABS_BAR}-${type}-extra-${size}`]: size
238
218
  });
239
219
 
240
220
  if (tabBarExtraContent) {
@@ -266,8 +246,8 @@ class TabBar extends React.Component {
266
246
  [cssClasses.TABS_BAR_LINE]: type === 'line',
267
247
  [cssClasses.TABS_BAR_CARD]: type === 'card',
268
248
  [cssClasses.TABS_BAR_BUTTON]: type === 'button',
269
- ["".concat(cssClasses.TABS_BAR, "-").concat(tabPosition)]: tabPosition,
270
- ["".concat(cssClasses.TABS_BAR, "-collapse")]: collapsible
249
+ [`${cssClasses.TABS_BAR}-${tabPosition}`]: tabPosition,
250
+ [`${cssClasses.TABS_BAR}-collapse`]: collapsible
271
251
  });
272
252
  const extra = this.renderExtra();
273
253
  const contents = collapsible ? this.renderCollapsedTab() : this.renderTabComponents(list);