@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
@@ -1,3 +1,4 @@
1
+ import _isFunction from "lodash/isFunction";
1
2
  import _isNumber from "lodash/isNumber";
2
3
  import _get from "lodash/get";
3
4
  import _noop from "lodash/noop";
@@ -17,6 +18,9 @@ import { cssClasses, strings, numbers } from '@douyinfe/semi-foundation/lib/es/s
17
18
  import BaseComponent from '../_base/baseComponent';
18
19
  import Tag from '../tag/index';
19
20
  import TagGroup from '../tag/group';
21
+ import OverflowList from '../overflowList/index';
22
+ import Space from '../space/index';
23
+ import Text from '../typography/text';
20
24
  import LocaleConsumer from '../locale/localeConsumer';
21
25
  import Popover from '../popover/index';
22
26
  import { numbers as popoverNumbers } from '@douyinfe/semi-foundation/lib/es/popover/constants';
@@ -111,7 +115,8 @@ class Select extends BaseComponent {
111
115
  optionGroups: [],
112
116
  isHovering: false,
113
117
  isFocusInContainer: false,
114
- isFullTags: false
118
+ isFullTags: false,
119
+ overflowItemCount: 0
115
120
  };
116
121
  /* Generate random string */
117
122
 
@@ -335,6 +340,11 @@ class Select extends BaseComponent {
335
340
  isFocus
336
341
  });
337
342
  },
343
+ updateOverflowItemCount: overflowItemCount => {
344
+ this.setState({
345
+ overflowItemCount
346
+ });
347
+ },
338
348
  focusTrigger: () => {
339
349
  try {
340
350
  const {
@@ -365,13 +375,13 @@ class Select extends BaseComponent {
365
375
  },
366
376
  updateScrollTop: index => {
367
377
  // eslint-disable-next-line max-len
368
- let optionClassName = ".".concat(prefixcls, "-option-selected");
378
+ let optionClassName = `.${prefixcls}-option-selected`;
369
379
 
370
380
  if (index !== undefined) {
371
- optionClassName = ".".concat(prefixcls, "-option:nth-child(").concat(index, ")");
381
+ optionClassName = `.${prefixcls}-option:nth-child(${index})`;
372
382
  }
373
383
 
374
- let destNode = document.querySelector("#".concat(prefixcls, "-").concat(this.selectOptionListID, " ").concat(optionClassName));
384
+ let destNode = document.querySelector(`#${prefixcls}-${this.selectOptionListID} ${optionClassName}`);
375
385
 
376
386
  if (Array.isArray(destNode)) {
377
387
  // eslint-disable-next-line prefer-destructuring
@@ -431,9 +441,9 @@ class Select extends BaseComponent {
431
441
 
432
442
  const inputPropsCls = _get(inputProps, 'className');
433
443
 
434
- const inputcls = cls("".concat(prefixcls, "-input"), {
435
- ["".concat(prefixcls, "-input-single")]: !multiple,
436
- ["".concat(prefixcls, "-input-multiple")]: multiple
444
+ const inputcls = cls(`${prefixcls}-input`, {
445
+ [`${prefixcls}-input-single`]: !multiple,
446
+ [`${prefixcls}-input-multiple`]: multiple
437
447
  }, inputPropsCls);
438
448
  const {
439
449
  inputValue,
@@ -449,7 +459,7 @@ class Select extends BaseComponent {
449
459
 
450
460
  if (multiple) {
451
461
  style = {
452
- width: inputValue ? "".concat(inputValue.length * 16, "px") : '2px'
462
+ width: inputValue ? `${inputValue.length * 16}px` : '2px'
453
463
  };
454
464
  selectInputProps.style = style;
455
465
  }
@@ -457,7 +467,7 @@ class Select extends BaseComponent {
457
467
  return /*#__PURE__*/React.createElement(Input, Object.assign({
458
468
  ref: this.inputRef,
459
469
  size: size,
460
- "aria-activedescendant": focusIndex !== -1 ? "".concat(this.selectID, "-option-").concat(focusIndex) : '',
470
+ "aria-activedescendant": focusIndex !== -1 ? `${this.selectID}-option-${focusIndex}` : '',
461
471
  onFocus: e => {
462
472
  // if multiple and filter, when use tab key to let select get focus
463
473
  // need to manual update state isFocus to let the focus style take effect
@@ -515,7 +525,7 @@ class Select extends BaseComponent {
515
525
  }
516
526
 
517
527
  renderLoading() {
518
- const loadingWrapperCls = "".concat(prefixcls, "-loading-wrapper");
528
+ const loadingWrapperCls = `${prefixcls}-loading-wrapper`;
519
529
  return /*#__PURE__*/React.createElement("div", {
520
530
  className: loadingWrapperCls
521
531
  }, /*#__PURE__*/React.createElement(Spin, null));
@@ -556,7 +566,7 @@ class Select extends BaseComponent {
556
566
  key: option.key || option.label + option.value + optionIndex,
557
567
  renderOptionItem: renderOptionItem,
558
568
  inputValue: inputValue,
559
- id: "".concat(this.selectID, "-option-").concat(optionIndex)
569
+ id: `${this.selectID}-option-${optionIndex}`
560
570
  }), option.label);
561
571
  }
562
572
 
@@ -580,7 +590,7 @@ class Select extends BaseComponent {
580
590
  }), /*#__PURE__*/React.createElement(LocaleConsumer, {
581
591
  componentName: "Select"
582
592
  }, locale => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
583
- className: "".concat(prefixcls, "-create-tips")
593
+ className: `${prefixcls}-create-tips`
584
594
  }, locale.createText), option.value)));
585
595
  return defaultCreateItem;
586
596
  }
@@ -682,42 +692,42 @@ class Select extends BaseComponent {
682
692
  minWidth: dropdownMinWidth
683
693
  }, dropdownStyle);
684
694
  const optionListCls = cls({
685
- ["".concat(prefixcls, "-option-list")]: true,
686
- ["".concat(prefixcls, "-option-list-chosen")]: selections.size
695
+ [`${prefixcls}-option-list`]: true,
696
+ [`${prefixcls}-option-list-chosen`]: selections.size
687
697
  });
688
698
  const isEmpty = !options.length || !options.some(item => item._show);
689
699
  return (
690
700
  /*#__PURE__*/
691
701
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
692
702
  React.createElement("div", {
693
- id: "".concat(prefixcls, "-").concat(this.selectOptionListID),
703
+ id: `${prefixcls}-${this.selectOptionListID}`,
694
704
  className: cls({
695
705
  // When emptyContent is null and the option is empty, there is no need for the drop-down option for the user,
696
706
  // so there is no need to set padding through this className
697
- ["".concat(prefixcls, "-option-list-wrapper")]: !(isEmpty && emptyContent === null)
707
+ [`${prefixcls}-option-list-wrapper`]: !(isEmpty && emptyContent === null)
698
708
  }, dropdownClassName),
699
709
  style: style,
700
710
  ref: this.setOptionContainerEl,
701
711
  onKeyDown: e => this.foundation.handleContainerKeyDown(e)
702
712
  }, outerTopSlot ? /*#__PURE__*/React.createElement("div", {
703
- className: "".concat(prefixcls, "-option-list-outer-top-slot"),
713
+ className: `${prefixcls}-option-list-outer-top-slot`,
704
714
  onMouseEnter: () => this.foundation.handleSlotMouseEnter()
705
715
  }, outerTopSlot) : null, /*#__PURE__*/React.createElement("div", {
706
716
  style: {
707
- maxHeight: "".concat(maxHeight, "px")
717
+ maxHeight: `${maxHeight}px`
708
718
  },
709
719
  className: optionListCls,
710
720
  role: "listbox",
711
721
  "aria-multiselectable": multiple,
712
722
  onScroll: e => this.foundation.handleListScroll(e)
713
723
  }, innerTopSlot ? /*#__PURE__*/React.createElement("div", {
714
- className: "".concat(prefixcls, "-option-list-inner-top-slot"),
724
+ className: `${prefixcls}-option-list-inner-top-slot`,
715
725
  onMouseEnter: () => this.foundation.handleSlotMouseEnter()
716
726
  }, innerTopSlot) : null, loading ? this.renderLoading() : isEmpty ? this.renderEmpty() : listContent, innerBottomSlot ? /*#__PURE__*/React.createElement("div", {
717
- className: "".concat(prefixcls, "-option-list-inner-bottom-slot"),
727
+ className: `${prefixcls}-option-list-inner-bottom-slot`,
718
728
  onMouseEnter: () => this.foundation.handleSlotMouseEnter()
719
729
  }, innerBottomSlot) : null), outerBottomSlot ? /*#__PURE__*/React.createElement("div", {
720
- className: "".concat(prefixcls, "-option-list-outer-bottom-slot"),
730
+ className: `${prefixcls}-option-list-outer-bottom-slot`,
721
731
  onMouseEnter: () => this.foundation.handleSlotMouseEnter()
722
732
  }, outerBottomSlot) : null)
723
733
  );
@@ -747,13 +757,13 @@ class Select extends BaseComponent {
747
757
  }
748
758
 
749
759
  const spanCls = cls({
750
- ["".concat(prefixcls, "-selection-text")]: true,
751
- ["".concat(prefixcls, "-selection-placeholder")]: !renderText && renderText !== 0,
752
- ["".concat(prefixcls, "-selection-text-hide")]: inputValue && showInput,
753
- ["".concat(prefixcls, "-selection-text-inactive")]: !inputValue && showInput // Stack Input & RenderText(opacity 0.4)
760
+ [`${prefixcls}-selection-text`]: true,
761
+ [`${prefixcls}-selection-placeholder`]: !renderText && renderText !== 0,
762
+ [`${prefixcls}-selection-text-hide`]: inputValue && showInput,
763
+ [`${prefixcls}-selection-text-inactive`]: !inputValue && showInput // Stack Input & RenderText(opacity 0.4)
754
764
 
755
765
  });
756
- const contentWrapperCls = "".concat(prefixcls, "-content-wrapper");
766
+ const contentWrapperCls = `${prefixcls}-content-wrapper`;
757
767
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
758
768
  className: contentWrapperCls
759
769
  }, /*#__PURE__*/React.createElement("span", {
@@ -762,22 +772,171 @@ class Select extends BaseComponent {
762
772
  }, renderText || renderText === 0 ? renderText : placeholder), filterable && showInput ? this.renderInput() : null));
763
773
  }
764
774
 
765
- renderMultipleSelection(selections, filterable) {
775
+ renderTag(item, i, isCollapseItem) {
776
+ const {
777
+ size,
778
+ disabled: selectDisabled
779
+ } = this.props;
780
+ let {
781
+ renderSelectedItem
782
+ } = this.props;
783
+ const label = item[0];
784
+ const {
785
+ value
786
+ } = item[1];
787
+ const disabled = item[1].disabled || selectDisabled;
788
+
789
+ const onClose = (tagContent, e) => {
790
+ if (e && typeof e.preventDefault === 'function') {
791
+ e.preventDefault(); // make sure that tag will not hidden immediately in controlled mode
792
+ }
793
+
794
+ this.foundation.removeTag({
795
+ label,
796
+ value
797
+ });
798
+ };
799
+
800
+ if (typeof renderSelectedItem === 'undefined') {
801
+ renderSelectedItem = optionNode => ({
802
+ isRenderInTag: true,
803
+ content: optionNode.label
804
+ });
805
+ }
806
+
807
+ const {
808
+ content,
809
+ isRenderInTag
810
+ } = renderSelectedItem(item[1], {
811
+ index: i,
812
+ disabled,
813
+ onClose
814
+ });
815
+ const basic = {
816
+ disabled,
817
+ closable: !disabled,
818
+ onClose
819
+ };
820
+ const realContent = isCollapseItem && !_isFunction(this.props.renderSelectedItem) ? /*#__PURE__*/React.createElement(Text, {
821
+ size: 'small',
822
+ ellipsis: {
823
+ rows: 1,
824
+ showTooltip: {
825
+ type: 'popover',
826
+ opts: {
827
+ style: {
828
+ width: 'auto',
829
+ fontSize: 12
830
+ }
831
+ }
832
+ }
833
+ }
834
+ }, content) : content;
835
+
836
+ if (isRenderInTag) {
837
+ return /*#__PURE__*/React.createElement(Tag, Object.assign({}, basic, {
838
+ color: "white",
839
+ size: size || 'large',
840
+ key: value,
841
+ style: {
842
+ maxWidth: '100%'
843
+ }
844
+ }), realContent);
845
+ } else {
846
+ return /*#__PURE__*/React.createElement(Fragment, {
847
+ key: value
848
+ }, realContent);
849
+ }
850
+ }
851
+
852
+ renderNTag(n, restTags) {
853
+ const {
854
+ size,
855
+ showRestTagsPopover,
856
+ restTagsPopoverProps
857
+ } = this.props;
858
+ let nTag = /*#__PURE__*/React.createElement(Tag, {
859
+ closable: false,
860
+ size: size || 'large',
861
+ color: 'grey',
862
+ className: `${prefixcls}-content-wrapper-collapse-tag`,
863
+ key: `_+${n}`,
864
+ style: {
865
+ marginRight: 0,
866
+ flexShrink: 0
867
+ }
868
+ }, "+", n);
869
+
870
+ if (showRestTagsPopover) {
871
+ nTag = /*#__PURE__*/React.createElement(Popover, Object.assign({
872
+ showArrow: true,
873
+ content: /*#__PURE__*/React.createElement(Space, {
874
+ spacing: 2,
875
+ wrap: true,
876
+ style: {
877
+ maxWidth: '400px'
878
+ }
879
+ }, restTags.map((tag, index) => this.renderTag(tag, index))),
880
+ trigger: "hover",
881
+ position: "top",
882
+ autoAdjustOverflow: true
883
+ }, restTagsPopoverProps, {
884
+ key: `_+${n}_Popover`
885
+ }), nTag);
886
+ }
887
+
888
+ return nTag;
889
+ }
890
+
891
+ renderOverflow(items, index) {
892
+ const isCollapse = true;
893
+ return items.length && items[0] ? this.renderTag(items[0], index, isCollapse) : null;
894
+ }
895
+
896
+ handleOverflow(items) {
897
+ const {
898
+ overflowItemCount,
899
+ selections
900
+ } = this.state;
901
+ const {
902
+ maxTagCount
903
+ } = this.props;
904
+ const maxVisibleCount = selections.size - maxTagCount;
905
+ const newOverFlowItemCount = maxVisibleCount > 0 ? maxVisibleCount + items.length - 1 : items.length - 1;
906
+
907
+ if (items.length > 1 && overflowItemCount !== newOverFlowItemCount) {
908
+ this.foundation.updateOverflowItemCount(selections.size, newOverFlowItemCount);
909
+ }
910
+ }
911
+
912
+ renderCollapsedTags(selections, length) {
913
+ const {
914
+ overflowItemCount
915
+ } = this.state;
916
+ const normalTags = typeof length === 'number' ? selections.slice(0, length) : selections;
917
+ return /*#__PURE__*/React.createElement("div", {
918
+ className: `${prefixcls}-content-wrapper-collapse`
919
+ }, /*#__PURE__*/React.createElement(OverflowList, {
920
+ items: normalTags,
921
+ overflowRenderer: overflowItems => this.renderOverflow(overflowItems, length - 1),
922
+ onOverflow: overflowItems => this.handleOverflow(overflowItems),
923
+ visibleItemRenderer: (item, index) => this.renderTag(item, index)
924
+ }), overflowItemCount > 0 && this.renderNTag(overflowItemCount, selections.slice(selections.length - overflowItemCount)));
925
+ }
926
+
927
+ renderOneLineTags(selectedItems, n) {
766
928
  let {
767
929
  renderSelectedItem
768
930
  } = this.props;
769
931
  const {
770
932
  showRestTagsPopover,
771
933
  restTagsPopoverProps,
772
- placeholder,
773
934
  maxTagCount
774
935
  } = this.props;
775
936
  const {
776
- inputValue,
777
937
  isFullTags
778
938
  } = this.state;
779
- const renderTags = [];
780
- const selectedItems = [...selections];
939
+ let tagContent;
781
940
 
782
941
  if (typeof renderSelectedItem === 'undefined') {
783
942
  renderSelectedItem = optionNode => ({
@@ -786,74 +945,87 @@ class Select extends BaseComponent {
786
945
  });
787
946
  }
788
947
 
789
- let mapItems = [];
790
- let tags = [];
791
- let tagContent;
792
-
793
- if (!_isNumber(maxTagCount)) {
794
- // maxTagCount is not set, all tags are displayed
795
- mapItems = selectedItems;
796
- tags = mapItems.map((item, i) => {
948
+ if (showRestTagsPopover) {
949
+ // showRestTagsPopover = true,
950
+ const mapItems = isFullTags ? selectedItems : selectedItems.slice(0, maxTagCount);
951
+ const tags = mapItems.map((item, i) => {
797
952
  return this.getTagItem(item, i, renderSelectedItem);
798
953
  });
799
- tagContent = tags;
954
+ tagContent = /*#__PURE__*/React.createElement(TagGroup, {
955
+ tagList: tags,
956
+ maxTagCount: n,
957
+ restCount: isFullTags ? undefined : selectedItems.length - maxTagCount,
958
+ size: "large",
959
+ mode: "custom",
960
+ showPopover: showRestTagsPopover,
961
+ popoverProps: restTagsPopoverProps,
962
+ onPlusNMouseEnter: () => {
963
+ this.foundation.updateIsFullTags();
964
+ }
965
+ });
800
966
  } else {
801
- // maxTagCount is set
802
- if (showRestTagsPopover) {
803
- // showRestTagsPopover = true,
804
- mapItems = isFullTags ? selectedItems : selectedItems.slice(0, maxTagCount);
805
- tags = mapItems.map((item, i) => {
806
- return this.getTagItem(item, i, renderSelectedItem);
807
- });
808
- const n = selectedItems.length > maxTagCount ? maxTagCount : undefined;
809
- tagContent = /*#__PURE__*/React.createElement(TagGroup, {
810
- tagList: tags,
811
- maxTagCount: n,
812
- restCount: isFullTags ? undefined : selectedItems.length - maxTagCount,
813
- size: "large",
814
- mode: "custom",
815
- showPopover: showRestTagsPopover,
816
- popoverProps: restTagsPopoverProps,
817
- onPlusNMouseEnter: () => {
818
- this.foundation.updateIsFullTags();
819
- }
820
- });
821
- } else {
822
- // If maxTagCount is set, showRestTagsPopover is false/undefined,
823
- // then there is no popover when hovering, no extra Tags are displayed,
824
- // only the tags and restCount displayed in the trigger need to be passed in
825
- mapItems = selectedItems.slice(0, maxTagCount);
826
- const n = selectedItems.length > maxTagCount ? maxTagCount : undefined;
827
- tags = mapItems.map((item, i) => {
828
- return this.getTagItem(item, i, renderSelectedItem);
829
- });
830
- tagContent = /*#__PURE__*/React.createElement(TagGroup, {
831
- tagList: tags,
832
- maxTagCount: n,
833
- restCount: selectedItems.length - maxTagCount,
834
- size: "large",
835
- mode: "custom"
836
- });
837
- }
967
+ // If maxTagCount is set, showRestTagsPopover is false/undefined,
968
+ // then there is no popover when hovering, no extra Tags are displayed,
969
+ // only the tags and restCount displayed in the trigger need to be passed in
970
+ const mapItems = selectedItems.slice(0, maxTagCount);
971
+ const tags = mapItems.map((item, i) => {
972
+ return this.getTagItem(item, i, renderSelectedItem);
973
+ });
974
+ tagContent = /*#__PURE__*/React.createElement(TagGroup, {
975
+ tagList: tags,
976
+ maxTagCount: n,
977
+ restCount: selectedItems.length - maxTagCount,
978
+ size: "large",
979
+ mode: "custom"
980
+ });
981
+ }
982
+
983
+ return tagContent;
984
+ }
985
+
986
+ renderMultipleSelection(selections, filterable) {
987
+ let {
988
+ renderSelectedItem
989
+ } = this.props;
990
+ const {
991
+ placeholder,
992
+ maxTagCount,
993
+ expandRestTagsOnClick,
994
+ ellipsisTrigger
995
+ } = this.props;
996
+ const {
997
+ inputValue,
998
+ isOpen
999
+ } = this.state;
1000
+ const selectedItems = [...selections];
1001
+
1002
+ if (typeof renderSelectedItem === 'undefined') {
1003
+ renderSelectedItem = optionNode => ({
1004
+ isRenderInTag: true,
1005
+ content: optionNode.label
1006
+ });
838
1007
  }
839
1008
 
840
1009
  const contentWrapperCls = cls({
841
- ["".concat(prefixcls, "-content-wrapper")]: true,
842
- ["".concat(prefixcls, "-content-wrapper-one-line")]: maxTagCount,
843
- ["".concat(prefixcls, "-content-wrapper-empty")]: !tags.length
1010
+ [`${prefixcls}-content-wrapper`]: true,
1011
+ [`${prefixcls}-content-wrapper-one-line`]: maxTagCount && !isOpen,
1012
+ [`${prefixcls}-content-wrapper-empty`]: !selectedItems.length
844
1013
  });
845
1014
  const spanCls = cls({
846
- ["".concat(prefixcls, "-selection-text")]: true,
847
- ["".concat(prefixcls, "-selection-placeholder")]: !tags.length,
848
- ["".concat(prefixcls, "-selection-text-hide")]: tags && tags.length // [prefixcls + '-selection-text-inactive']: !inputValue && !tags.length,
849
-
1015
+ [`${prefixcls}-selection-text`]: true,
1016
+ [`${prefixcls}-selection-placeholder`]: !selectedItems.length,
1017
+ [`${prefixcls}-selection-text-hide`]: selectedItems && selectedItems.length
850
1018
  });
851
1019
  const placeholderText = placeholder && !inputValue ? /*#__PURE__*/React.createElement("span", {
852
1020
  className: spanCls
853
1021
  }, placeholder) : null;
1022
+ const n = selectedItems.length > maxTagCount ? maxTagCount : undefined;
1023
+ const NotOneLine = !maxTagCount;
1024
+ const oneLineTags = ellipsisTrigger ? this.renderCollapsedTags(selectedItems, n) : this.renderOneLineTags(selectedItems, n);
1025
+ const tagContent = NotOneLine || expandRestTagsOnClick && isOpen ? selectedItems.map((item, i) => this.renderTag(item, i)) : oneLineTags;
854
1026
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
855
1027
  className: contentWrapperCls
856
- }, tags && tags.length ? tagContent : placeholderText, !filterable ? null : this.renderInput()));
1028
+ }, selectedItems && selectedItems.length ? tagContent : placeholderText, !filterable ? null : this.renderInput()));
857
1029
  }
858
1030
 
859
1031
  onMouseEnter(e) {
@@ -909,9 +1081,9 @@ class Select extends BaseComponent {
909
1081
  suffix
910
1082
  } = this.props;
911
1083
  const suffixWrapperCls = cls({
912
- ["".concat(prefixcls, "-suffix")]: true,
913
- ["".concat(prefixcls, "-suffix-text")]: suffix && _isString(suffix),
914
- ["".concat(prefixcls, "-suffix-icon")]: isSemiIcon(suffix)
1084
+ [`${prefixcls}-suffix`]: true,
1085
+ [`${prefixcls}-suffix-text`]: suffix && _isString(suffix),
1086
+ [`${prefixcls}-suffix-icon`]: isSemiIcon(suffix)
915
1087
  });
916
1088
  return /*#__PURE__*/React.createElement("div", {
917
1089
  className: suffixWrapperCls,
@@ -927,10 +1099,10 @@ class Select extends BaseComponent {
927
1099
  } = this.props;
928
1100
  const labelNode = prefix || insetLabel;
929
1101
  const prefixWrapperCls = cls({
930
- ["".concat(prefixcls, "-prefix")]: true,
931
- ["".concat(prefixcls, "-inset-label")]: insetLabel,
932
- ["".concat(prefixcls, "-prefix-text")]: labelNode && _isString(labelNode),
933
- ["".concat(prefixcls, "-prefix-icon")]: isSemiIcon(labelNode)
1102
+ [`${prefixcls}-prefix`]: true,
1103
+ [`${prefixcls}-inset-label`]: insetLabel,
1104
+ [`${prefixcls}-prefix-text`]: labelNode && _isString(labelNode),
1105
+ [`${prefixcls}-prefix-icon`]: isSemiIcon(labelNode)
934
1106
  });
935
1107
  return /*#__PURE__*/React.createElement("div", {
936
1108
  className: prefixWrapperCls,
@@ -972,26 +1144,26 @@ class Select extends BaseComponent {
972
1144
  const filterable = Boolean(filter); // filter(boolean || function)
973
1145
 
974
1146
  const selectionCls = useCustomTrigger ? cls(className) : cls(prefixcls, className, {
975
- ["".concat(prefixcls, "-open")]: isOpen,
976
- ["".concat(prefixcls, "-focus")]: isFocus,
977
- ["".concat(prefixcls, "-disabled")]: disabled,
978
- ["".concat(prefixcls, "-single")]: !multiple,
979
- ["".concat(prefixcls, "-multiple")]: multiple,
980
- ["".concat(prefixcls, "-filterable")]: filterable,
981
- ["".concat(prefixcls, "-small")]: size === 'small',
982
- ["".concat(prefixcls, "-large")]: size === 'large',
983
- ["".concat(prefixcls, "-error")]: validateStatus === 'error',
984
- ["".concat(prefixcls, "-warning")]: validateStatus === 'warning',
985
- ["".concat(prefixcls, "-no-arrow")]: !showArrow,
986
- ["".concat(prefixcls, "-with-prefix")]: prefix || insetLabel,
987
- ["".concat(prefixcls, "-with-suffix")]: suffix
1147
+ [`${prefixcls}-open`]: isOpen,
1148
+ [`${prefixcls}-focus`]: isFocus,
1149
+ [`${prefixcls}-disabled`]: disabled,
1150
+ [`${prefixcls}-single`]: !multiple,
1151
+ [`${prefixcls}-multiple`]: multiple,
1152
+ [`${prefixcls}-filterable`]: filterable,
1153
+ [`${prefixcls}-small`]: size === 'small',
1154
+ [`${prefixcls}-large`]: size === 'large',
1155
+ [`${prefixcls}-error`]: validateStatus === 'error',
1156
+ [`${prefixcls}-warning`]: validateStatus === 'warning',
1157
+ [`${prefixcls}-no-arrow`]: !showArrow,
1158
+ [`${prefixcls}-with-prefix`]: prefix || insetLabel,
1159
+ [`${prefixcls}-with-suffix`]: suffix
988
1160
  });
989
1161
  const showClear = this.props.showClear && (selections.size || inputValue) && !disabled && (isHovering || isOpen);
990
1162
  const arrowContent = showArrow ? /*#__PURE__*/React.createElement("div", {
991
- className: "".concat(prefixcls, "-arrow"),
1163
+ className: `${prefixcls}-arrow`,
992
1164
  "x-semi-prop": "arrowIcon"
993
1165
  }, arrowIcon) : /*#__PURE__*/React.createElement("div", {
994
- className: "".concat(prefixcls, "-arrow-empty")
1166
+ className: `${prefixcls}-arrow-empty`
995
1167
  });
996
1168
  const clear = clearIcon ? clearIcon : /*#__PURE__*/React.createElement(IconClear, null);
997
1169
  const inner = useCustomTrigger ? /*#__PURE__*/React.createElement(Trigger, {
@@ -1009,11 +1181,11 @@ class Select extends BaseComponent {
1009
1181
  }, prefix || insetLabel ? this.renderPrefix() : null), /*#__PURE__*/React.createElement(Fragment, {
1010
1182
  key: "selection"
1011
1183
  }, /*#__PURE__*/React.createElement("div", {
1012
- className: cls("".concat(prefixcls, "-selection"))
1184
+ className: cls(`${prefixcls}-selection`)
1013
1185
  }, multiple ? this.renderMultipleSelection(selections, filterable) : this.renderSingleSelection(selections, filterable))), /*#__PURE__*/React.createElement(Fragment, {
1014
1186
  key: "clearicon"
1015
1187
  }, showClear ? /*#__PURE__*/React.createElement("div", {
1016
- className: cls("".concat(prefixcls, "-clear")),
1188
+ className: cls(`${prefixcls}-clear`),
1017
1189
  onClick: this.onClear
1018
1190
  }, clear) : arrowContent), /*#__PURE__*/React.createElement(Fragment, {
1019
1191
  key: "suffix"
@@ -1036,7 +1208,7 @@ class Select extends BaseComponent {
1036
1208
  role: "combobox",
1037
1209
  "aria-disabled": disabled,
1038
1210
  "aria-expanded": isOpen,
1039
- "aria-controls": "".concat(prefixcls, "-").concat(this.selectOptionListID),
1211
+ "aria-controls": `${prefixcls}-${this.selectOptionListID}`,
1040
1212
  "aria-haspopup": "listbox",
1041
1213
  "aria-label": selections.size ? 'selected' : '',
1042
1214
  "aria-invalid": this.props['aria-invalid'],
@@ -1050,7 +1222,7 @@ class Select extends BaseComponent {
1050
1222
  style: style,
1051
1223
  id: this.selectID,
1052
1224
  tabIndex: tabIndex,
1053
- "aria-activedescendant": focusIndex !== -1 ? "".concat(this.selectID, "-option-").concat(focusIndex) : '',
1225
+ "aria-activedescendant": focusIndex !== -1 ? `${this.selectID}-option-${focusIndex}` : '',
1054
1226
  onMouseEnter: this.onMouseEnter,
1055
1227
  onMouseLeave: this.onMouseLeave,
1056
1228
  onFocus: e => this.foundation.handleTriggerFocus(e),
@@ -1123,6 +1295,7 @@ Select.propTypes = {
1123
1295
  children: PropTypes.node,
1124
1296
  clearIcon: PropTypes.node,
1125
1297
  defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.array, PropTypes.object]),
1298
+ ellipsisTrigger: PropTypes.bool,
1126
1299
  value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.array, PropTypes.object]),
1127
1300
  placeholder: PropTypes.node,
1128
1301
  onChange: PropTypes.func,
@@ -1139,6 +1312,7 @@ Select.propTypes = {
1139
1312
  size: PropTypes.oneOf(strings.SIZE_SET),
1140
1313
  disabled: PropTypes.bool,
1141
1314
  emptyContent: PropTypes.node,
1315
+ expandRestTagsOnClick: PropTypes.bool,
1142
1316
  onDropdownVisibleChange: PropTypes.func,
1143
1317
  zIndex: PropTypes.number,
1144
1318
  position: PropTypes.oneOf(strings.POSITION_SET),
@@ -1233,7 +1407,9 @@ Select.defaultProps = {
1233
1407
  "aria-label": ''
1234
1408
  }),
1235
1409
  showRestTagsPopover: false,
1236
- restTagsPopoverProps: {} // Radio selection is different from the default renderSelectedItem for multiple selection, so it is not declared here
1410
+ restTagsPopoverProps: {},
1411
+ expandRestTagsOnClick: false,
1412
+ ellipsisTrigger: false // Radio selection is different from the default renderSelectedItem for multiple selection, so it is not declared here
1237
1413
  // renderSelectedItem: (optionNode) => optionNode.label,
1238
1414
  // The default creator rendering is related to i18, so it is not declared here
1239
1415
  // renderCreateItem: (input) => input
@@ -82,13 +82,13 @@ class Option extends PureComponent {
82
82
  rest = __rest(_a, ["children", "disabled", "value", "selected", "label", "empty", "emptyContent", "onSelect", "focused", "showTick", "className", "style", "onMouseEnter", "prefixCls", "renderOptionItem", "inputValue", "id"]);
83
83
 
84
84
  const optionClassName = classNames(prefixCls, {
85
- ["".concat(prefixCls, "-disabled")]: disabled,
86
- ["".concat(prefixCls, "-selected")]: selected,
87
- ["".concat(prefixCls, "-focused")]: focused,
88
- ["".concat(prefixCls, "-empty")]: empty,
85
+ [`${prefixCls}-disabled`]: disabled,
86
+ [`${prefixCls}-selected`]: selected,
87
+ [`${prefixCls}-focused`]: focused,
88
+ [`${prefixCls}-empty`]: empty,
89
89
  [className]: className
90
90
  });
91
- const selectedIconClassName = classNames(["".concat(prefixCls, "-icon")]);
91
+ const selectedIconClassName = classNames([`${prefixCls}-icon`]);
92
92
 
93
93
  if (empty) {
94
94
  if (emptyContent === null) {
@@ -126,7 +126,7 @@ class Option extends PureComponent {
126
126
  searchWords: inputValue,
127
127
  sourceString: children,
128
128
  option: {
129
- highlightClassName: "".concat(prefixCls, "-keyword")
129
+ highlightClassName: `${prefixCls}-keyword`
130
130
  }
131
131
  };
132
132
  return (
@@ -150,7 +150,7 @@ class Option extends PureComponent {
150
150
  }, showTick ? /*#__PURE__*/React.createElement("div", {
151
151
  className: selectedIconClassName
152
152
  }, /*#__PURE__*/React.createElement(IconTick, null)) : null, _isString(children) ? /*#__PURE__*/React.createElement("div", {
153
- className: "".concat(prefixCls, "-text")
153
+ className: `${prefixCls}-text`
154
154
  }, this.renderOptionContent({
155
155
  children,
156
156
  config,