@douyinfe/semi-ui 2.9.0-beta.0 → 2.9.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (338) hide show
  1. package/_base/baseComponent.tsx +2 -1
  2. package/_portal/index.tsx +2 -1
  3. package/anchor/index.tsx +2 -1
  4. package/anchor/link.tsx +2 -1
  5. package/autoComplete/index.tsx +2 -2
  6. package/avatar/interface.ts +2 -2
  7. package/backtop/index.tsx +1 -0
  8. package/badge/index.tsx +4 -2
  9. package/banner/index.tsx +1 -0
  10. package/breadcrumb/bread-context.tsx +2 -2
  11. package/breadcrumb/index.tsx +2 -2
  12. package/breadcrumb/item.tsx +11 -3
  13. package/button/Button.tsx +2 -1
  14. package/button/buttonGroup.tsx +2 -1
  15. package/calendar/_story/Demo.tsx +3 -3
  16. package/card/cardGroup.tsx +1 -0
  17. package/card/index.tsx +1 -0
  18. package/cascader/index.tsx +3 -2
  19. package/cascader/item.tsx +3 -1
  20. package/checkbox/checkbox.tsx +4 -2
  21. package/checkbox/checkboxGroup.tsx +1 -1
  22. package/checkbox/context.ts +3 -3
  23. package/collapse/index.tsx +1 -0
  24. package/collapse/item.tsx +3 -0
  25. package/collapsible/index.tsx +2 -2
  26. package/configProvider/context.tsx +1 -1
  27. package/datePicker/datePicker.tsx +2 -1
  28. package/descriptions/index.tsx +2 -1
  29. package/descriptions/item.tsx +4 -1
  30. package/dist/css/semi.min.css +1 -1
  31. package/dist/umd/semi-ui.js +7563 -3604
  32. package/dist/umd/semi-ui.js.map +1 -1
  33. package/dist/umd/semi-ui.min.js +1 -1
  34. package/dist/umd/semi-ui.min.js.map +1 -1
  35. package/dropdown/context.ts +6 -1
  36. package/dropdown/dropdownItem.tsx +2 -1
  37. package/dropdown/dropdownTitle.tsx +2 -1
  38. package/dropdown/index.tsx +3 -1
  39. package/empty/index.tsx +1 -1
  40. package/form/arrayField.tsx +1 -0
  41. package/form/baseForm.tsx +3 -2
  42. package/form/group.tsx +2 -0
  43. package/form/hoc/withField.tsx +1 -1
  44. package/form/label.tsx +1 -0
  45. package/form/section.tsx +1 -1
  46. package/form/slot.tsx +2 -0
  47. package/grid/col.tsx +3 -1
  48. package/grid/row.tsx +5 -1
  49. package/layout/Sider.tsx +3 -1
  50. package/layout/index.tsx +2 -0
  51. package/layout/layout-context.ts +1 -1
  52. package/lib/cjs/_base/baseComponent.d.ts +2 -1
  53. package/lib/cjs/_portal/index.d.ts +3 -1
  54. package/lib/cjs/anchor/index.d.ts +2 -1
  55. package/lib/cjs/anchor/link.d.ts +3 -2
  56. package/lib/cjs/autoComplete/index.d.ts +2 -2
  57. package/lib/cjs/avatar/avatarGroup.d.ts +1 -1
  58. package/lib/cjs/avatar/interface.d.ts +2 -2
  59. package/lib/cjs/backtop/index.d.ts +1 -0
  60. package/lib/cjs/badge/index.d.ts +4 -2
  61. package/lib/cjs/banner/index.d.ts +2 -1
  62. package/lib/cjs/breadcrumb/bread-context.d.ts +2 -2
  63. package/lib/cjs/breadcrumb/index.d.ts +2 -2
  64. package/lib/cjs/breadcrumb/item.d.ts +15 -3
  65. package/lib/cjs/button/Button.d.ts +2 -1
  66. package/lib/cjs/button/buttonGroup.d.ts +1 -0
  67. package/lib/cjs/button/index.d.ts +1 -1
  68. package/lib/cjs/calendar/timeCol.d.ts +1 -1
  69. package/lib/cjs/card/cardGroup.d.ts +1 -0
  70. package/lib/cjs/card/index.d.ts +2 -1
  71. package/lib/cjs/cascader/index.d.ts +5 -3
  72. package/lib/cjs/cascader/item.d.ts +3 -1
  73. package/lib/cjs/checkbox/checkbox.d.ts +5 -11
  74. package/lib/cjs/checkbox/checkbox.js +1 -1
  75. package/lib/cjs/checkbox/checkboxGroup.d.ts +1 -1
  76. package/lib/cjs/checkbox/checkboxInner.d.ts +1 -10
  77. package/lib/cjs/checkbox/context.d.ts +3 -3
  78. package/lib/cjs/collapse/index.d.ts +1 -0
  79. package/lib/cjs/collapse/item.d.ts +2 -0
  80. package/lib/cjs/collapsible/index.d.ts +1 -1
  81. package/lib/cjs/configProvider/index.d.ts +1 -1
  82. package/lib/cjs/datePicker/datePicker.d.ts +3 -1
  83. package/lib/cjs/datePicker/insetInput.d.ts +1 -0
  84. package/lib/cjs/descriptions/index.d.ts +4 -3
  85. package/lib/cjs/descriptions/item.d.ts +4 -1
  86. package/lib/cjs/dropdown/context.d.ts +5 -3
  87. package/lib/cjs/dropdown/dropdownItem.d.ts +3 -3
  88. package/lib/cjs/dropdown/dropdownMenu.d.ts +1 -0
  89. package/lib/cjs/dropdown/dropdownTitle.d.ts +3 -3
  90. package/lib/cjs/dropdown/index.d.ts +3 -3
  91. package/lib/cjs/empty/index.d.ts +1 -1
  92. package/lib/cjs/form/arrayField.d.ts +1 -0
  93. package/lib/cjs/form/baseForm.d.ts +2 -2
  94. package/lib/cjs/form/baseForm.js +1 -1
  95. package/lib/cjs/form/errorMessage.d.ts +1 -1
  96. package/lib/cjs/form/group.d.ts +3 -1
  97. package/lib/cjs/form/label.d.ts +1 -0
  98. package/lib/cjs/form/section.d.ts +1 -1
  99. package/lib/cjs/form/slot.js +2 -0
  100. package/lib/cjs/grid/col.d.ts +3 -3
  101. package/lib/cjs/grid/row.d.ts +4 -3
  102. package/lib/cjs/iconButton/index.d.ts +1 -1
  103. package/lib/cjs/inputNumber/index.d.ts +1 -1
  104. package/lib/cjs/layout/Sider.d.ts +4 -1
  105. package/lib/cjs/layout/index.d.ts +2 -0
  106. package/lib/cjs/list/index.d.ts +1 -0
  107. package/lib/cjs/list/item.d.ts +5 -1
  108. package/lib/cjs/list/item.js +5 -1
  109. package/lib/cjs/modal/Modal.d.ts +1 -0
  110. package/lib/cjs/modal/ModalContent.d.ts +7 -2
  111. package/lib/cjs/modal/confirm.d.ts +10 -5
  112. package/lib/cjs/modal/useModal/index.d.ts +1 -0
  113. package/lib/cjs/navigation/Footer.d.ts +3 -5
  114. package/lib/cjs/navigation/Header.d.ts +4 -6
  115. package/lib/cjs/navigation/Item.d.ts +4 -6
  116. package/lib/cjs/navigation/OpenIconTransition.d.ts +2 -1
  117. package/lib/cjs/navigation/SubNav.d.ts +3 -5
  118. package/lib/cjs/navigation/SubNav.js +2 -2
  119. package/lib/cjs/navigation/SubNavTransition.d.ts +1 -1
  120. package/lib/cjs/navigation/index.d.ts +2 -2
  121. package/lib/cjs/navigation/nav-context.d.ts +21 -5
  122. package/lib/cjs/notification/NoticeTransition.d.ts +2 -2
  123. package/lib/cjs/notification/index.d.ts +3 -1
  124. package/lib/cjs/notification/notice.d.ts +3 -1
  125. package/lib/cjs/notification/useNotification/index.d.ts +1 -0
  126. package/lib/cjs/overflowList/intersectionObserver.d.ts +3 -2
  127. package/lib/cjs/pagination/index.d.ts +3 -1
  128. package/lib/cjs/pagination/index.js +15 -11
  129. package/lib/cjs/popconfirm/index.d.ts +4 -2
  130. package/lib/cjs/popover/index.d.ts +4 -2
  131. package/lib/cjs/progress/index.d.ts +1 -1
  132. package/lib/cjs/radio/radio.d.ts +1 -0
  133. package/lib/cjs/radio/radioGroup.d.ts +1 -0
  134. package/lib/cjs/select/index.d.ts +3 -1
  135. package/lib/cjs/select/optionGroup.d.ts +1 -1
  136. package/lib/cjs/sideSheet/SideSheetContent.d.ts +1 -0
  137. package/lib/cjs/sideSheet/SideSheetTransition.d.ts +1 -1
  138. package/lib/cjs/sideSheet/index.d.ts +3 -1
  139. package/lib/cjs/table/Body/BaseRow.d.ts +1 -1
  140. package/lib/cjs/table/Body/ExpandedRow.d.ts +4 -2
  141. package/lib/cjs/table/Body/SectionRow.d.ts +3 -1
  142. package/lib/cjs/table/Column.d.ts +1 -1
  143. package/lib/cjs/table/ColumnShape.d.ts +1 -1
  144. package/lib/cjs/table/CustomExpandIcon.d.ts +1 -1
  145. package/lib/cjs/table/Table.d.ts +10 -8
  146. package/lib/cjs/table/TableCell.d.ts +5 -3
  147. package/lib/cjs/table/TableHeaderRow.d.ts +3 -1
  148. package/lib/cjs/table/index.d.ts +4 -4
  149. package/lib/cjs/table/table-context.d.ts +7 -6
  150. package/lib/cjs/tabs/TabPane.d.ts +3 -1
  151. package/lib/cjs/tabs/interface.d.ts +2 -1
  152. package/lib/cjs/tag/group.d.ts +1 -1
  153. package/lib/cjs/timePicker/Combobox.d.ts +1 -0
  154. package/lib/cjs/timeline/index.d.ts +2 -1
  155. package/lib/cjs/timeline/item.d.ts +1 -0
  156. package/lib/cjs/toast/ToastTransition.d.ts +1 -1
  157. package/lib/cjs/toast/index.d.ts +8 -16
  158. package/lib/cjs/toast/toast.d.ts +4 -2
  159. package/lib/cjs/toast/useToast/index.d.ts +1 -0
  160. package/lib/cjs/tooltip/index.d.ts +4 -2
  161. package/lib/cjs/transfer/index.d.ts +3 -3
  162. package/lib/cjs/transfer/index.js +2 -1
  163. package/lib/cjs/tree/index.d.ts +13 -11
  164. package/lib/cjs/tree/nodeList.d.ts +1 -1
  165. package/lib/cjs/tree/treeContext.d.ts +10 -10
  166. package/lib/cjs/tree/treeNode.d.ts +11 -9
  167. package/lib/cjs/tree/treeNode.js +2 -0
  168. package/lib/cjs/treeSelect/index.d.ts +7 -5
  169. package/lib/cjs/typography/copyable.d.ts +1 -1
  170. package/lib/cjs/upload/index.d.ts +2 -2
  171. package/lib/es/_base/baseComponent.d.ts +2 -1
  172. package/lib/es/_portal/index.d.ts +3 -1
  173. package/lib/es/anchor/index.d.ts +2 -1
  174. package/lib/es/anchor/link.d.ts +3 -2
  175. package/lib/es/autoComplete/index.d.ts +2 -2
  176. package/lib/es/avatar/avatarGroup.d.ts +1 -1
  177. package/lib/es/avatar/interface.d.ts +2 -2
  178. package/lib/es/backtop/index.d.ts +1 -0
  179. package/lib/es/badge/index.d.ts +4 -2
  180. package/lib/es/banner/index.d.ts +2 -1
  181. package/lib/es/breadcrumb/bread-context.d.ts +2 -2
  182. package/lib/es/breadcrumb/index.d.ts +2 -2
  183. package/lib/es/breadcrumb/item.d.ts +15 -3
  184. package/lib/es/button/Button.d.ts +2 -1
  185. package/lib/es/button/buttonGroup.d.ts +1 -0
  186. package/lib/es/button/index.d.ts +1 -1
  187. package/lib/es/calendar/timeCol.d.ts +1 -1
  188. package/lib/es/card/cardGroup.d.ts +1 -0
  189. package/lib/es/card/index.d.ts +2 -1
  190. package/lib/es/cascader/index.d.ts +5 -3
  191. package/lib/es/cascader/item.d.ts +3 -1
  192. package/lib/es/checkbox/checkbox.d.ts +5 -11
  193. package/lib/es/checkbox/checkbox.js +1 -1
  194. package/lib/es/checkbox/checkboxGroup.d.ts +1 -1
  195. package/lib/es/checkbox/checkboxInner.d.ts +1 -10
  196. package/lib/es/checkbox/context.d.ts +3 -3
  197. package/lib/es/collapse/index.d.ts +1 -0
  198. package/lib/es/collapse/item.d.ts +2 -0
  199. package/lib/es/collapsible/index.d.ts +1 -1
  200. package/lib/es/configProvider/index.d.ts +1 -1
  201. package/lib/es/datePicker/datePicker.d.ts +3 -1
  202. package/lib/es/datePicker/insetInput.d.ts +1 -0
  203. package/lib/es/descriptions/index.d.ts +4 -3
  204. package/lib/es/descriptions/item.d.ts +4 -1
  205. package/lib/es/dropdown/context.d.ts +5 -3
  206. package/lib/es/dropdown/dropdownItem.d.ts +3 -3
  207. package/lib/es/dropdown/dropdownMenu.d.ts +1 -0
  208. package/lib/es/dropdown/dropdownTitle.d.ts +3 -3
  209. package/lib/es/dropdown/index.d.ts +3 -3
  210. package/lib/es/empty/index.d.ts +1 -1
  211. package/lib/es/form/arrayField.d.ts +1 -0
  212. package/lib/es/form/baseForm.d.ts +2 -2
  213. package/lib/es/form/baseForm.js +1 -1
  214. package/lib/es/form/errorMessage.d.ts +1 -1
  215. package/lib/es/form/group.d.ts +3 -1
  216. package/lib/es/form/label.d.ts +1 -0
  217. package/lib/es/form/section.d.ts +1 -1
  218. package/lib/es/form/slot.js +2 -0
  219. package/lib/es/grid/col.d.ts +3 -3
  220. package/lib/es/grid/row.d.ts +4 -3
  221. package/lib/es/iconButton/index.d.ts +1 -1
  222. package/lib/es/inputNumber/index.d.ts +1 -1
  223. package/lib/es/layout/Sider.d.ts +4 -1
  224. package/lib/es/layout/index.d.ts +2 -0
  225. package/lib/es/list/index.d.ts +1 -0
  226. package/lib/es/list/item.d.ts +5 -1
  227. package/lib/es/list/item.js +5 -1
  228. package/lib/es/modal/Modal.d.ts +1 -0
  229. package/lib/es/modal/ModalContent.d.ts +7 -2
  230. package/lib/es/modal/confirm.d.ts +10 -5
  231. package/lib/es/modal/useModal/index.d.ts +1 -0
  232. package/lib/es/navigation/Footer.d.ts +3 -5
  233. package/lib/es/navigation/Header.d.ts +4 -6
  234. package/lib/es/navigation/Item.d.ts +4 -6
  235. package/lib/es/navigation/OpenIconTransition.d.ts +2 -1
  236. package/lib/es/navigation/SubNav.d.ts +3 -5
  237. package/lib/es/navigation/SubNav.js +2 -2
  238. package/lib/es/navigation/SubNavTransition.d.ts +1 -1
  239. package/lib/es/navigation/index.d.ts +2 -2
  240. package/lib/es/navigation/nav-context.d.ts +21 -5
  241. package/lib/es/notification/NoticeTransition.d.ts +2 -2
  242. package/lib/es/notification/index.d.ts +3 -1
  243. package/lib/es/notification/notice.d.ts +3 -1
  244. package/lib/es/notification/useNotification/index.d.ts +1 -0
  245. package/lib/es/overflowList/intersectionObserver.d.ts +3 -2
  246. package/lib/es/pagination/index.d.ts +3 -1
  247. package/lib/es/pagination/index.js +15 -11
  248. package/lib/es/popconfirm/index.d.ts +4 -2
  249. package/lib/es/popover/index.d.ts +4 -2
  250. package/lib/es/progress/index.d.ts +1 -1
  251. package/lib/es/radio/radio.d.ts +1 -0
  252. package/lib/es/radio/radioGroup.d.ts +1 -0
  253. package/lib/es/select/index.d.ts +3 -1
  254. package/lib/es/select/optionGroup.d.ts +1 -1
  255. package/lib/es/sideSheet/SideSheetContent.d.ts +1 -0
  256. package/lib/es/sideSheet/SideSheetTransition.d.ts +1 -1
  257. package/lib/es/sideSheet/index.d.ts +3 -1
  258. package/lib/es/table/Body/BaseRow.d.ts +1 -1
  259. package/lib/es/table/Body/ExpandedRow.d.ts +4 -2
  260. package/lib/es/table/Body/SectionRow.d.ts +3 -1
  261. package/lib/es/table/Column.d.ts +1 -1
  262. package/lib/es/table/ColumnShape.d.ts +1 -1
  263. package/lib/es/table/CustomExpandIcon.d.ts +1 -1
  264. package/lib/es/table/Table.d.ts +10 -8
  265. package/lib/es/table/TableCell.d.ts +5 -3
  266. package/lib/es/table/TableHeaderRow.d.ts +3 -1
  267. package/lib/es/table/index.d.ts +4 -4
  268. package/lib/es/table/table-context.d.ts +7 -6
  269. package/lib/es/tabs/TabPane.d.ts +3 -1
  270. package/lib/es/tabs/interface.d.ts +2 -1
  271. package/lib/es/tag/group.d.ts +1 -1
  272. package/lib/es/timePicker/Combobox.d.ts +1 -0
  273. package/lib/es/timeline/index.d.ts +2 -1
  274. package/lib/es/timeline/item.d.ts +1 -0
  275. package/lib/es/toast/ToastTransition.d.ts +1 -1
  276. package/lib/es/toast/index.d.ts +8 -16
  277. package/lib/es/toast/toast.d.ts +4 -2
  278. package/lib/es/toast/useToast/index.d.ts +1 -0
  279. package/lib/es/tooltip/index.d.ts +4 -2
  280. package/lib/es/transfer/index.d.ts +3 -3
  281. package/lib/es/transfer/index.js +3 -1
  282. package/lib/es/tree/index.d.ts +13 -11
  283. package/lib/es/tree/nodeList.d.ts +1 -1
  284. package/lib/es/tree/treeContext.d.ts +10 -10
  285. package/lib/es/tree/treeNode.d.ts +11 -9
  286. package/lib/es/tree/treeNode.js +2 -0
  287. package/lib/es/treeSelect/index.d.ts +7 -5
  288. package/lib/es/typography/copyable.d.ts +1 -1
  289. package/lib/es/upload/index.d.ts +2 -2
  290. package/list/index.tsx +1 -0
  291. package/list/item.tsx +6 -1
  292. package/modal/Modal.tsx +1 -0
  293. package/modal/ModalContent.tsx +9 -3
  294. package/navigation/Footer.tsx +3 -1
  295. package/navigation/Header.tsx +3 -1
  296. package/navigation/Item.tsx +4 -3
  297. package/navigation/OpenIconTransition.tsx +2 -1
  298. package/navigation/SubNav.tsx +4 -3
  299. package/navigation/SubNavTransition.tsx +1 -1
  300. package/navigation/nav-context.ts +22 -1
  301. package/notification/NoticeTransition.tsx +1 -1
  302. package/notification/index.tsx +3 -1
  303. package/notification/notice.tsx +3 -1
  304. package/overflowList/intersectionObserver.tsx +2 -1
  305. package/package.json +9 -9
  306. package/pagination/index.tsx +4 -1
  307. package/popconfirm/index.tsx +3 -1
  308. package/popover/index.tsx +3 -1
  309. package/radio/radio.tsx +1 -0
  310. package/radio/radioGroup.tsx +1 -0
  311. package/select/index.tsx +2 -1
  312. package/select/utils.tsx +1 -1
  313. package/sideSheet/SideSheetContent.tsx +1 -0
  314. package/sideSheet/SideSheetTransition.tsx +1 -1
  315. package/sideSheet/index.tsx +3 -2
  316. package/table/Body/ExpandedRow.tsx +3 -1
  317. package/table/Body/SectionRow.tsx +3 -1
  318. package/table/Body/index.tsx +3 -2
  319. package/table/Table.tsx +4 -3
  320. package/table/TableCell.tsx +6 -4
  321. package/table/TableHeaderRow.tsx +3 -1
  322. package/table/table-context.ts +10 -6
  323. package/tabs/TabPane.tsx +2 -0
  324. package/tabs/index.tsx +2 -2
  325. package/tabs/interface.ts +2 -1
  326. package/tag/group.tsx +5 -5
  327. package/timePicker/TimePicker.tsx +1 -1
  328. package/timeline/index.tsx +1 -0
  329. package/timeline/item.tsx +1 -0
  330. package/toast/ToastTransition.tsx +1 -1
  331. package/toast/toast.tsx +3 -1
  332. package/tooltip/index.tsx +2 -1
  333. package/transfer/index.tsx +3 -1
  334. package/tree/index.tsx +12 -11
  335. package/tree/treeContext.tsx +10 -10
  336. package/tree/treeNode.tsx +10 -7
  337. package/treeSelect/index.tsx +5 -4
  338. package/upload/index.tsx +1 -1
@@ -1,6 +1,7 @@
1
1
  import React, { PureComponent } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import '@douyinfe/semi-foundation/lib/es/navigation/navigation.css';
4
+ import { NavContextType } from './nav-context';
4
5
  import { BaseProps } from '../_base/baseComponent';
5
6
  export declare type Logo = React.ReactNode;
6
7
  export interface NavHeaderProps extends BaseProps {
@@ -11,14 +12,10 @@ export interface NavHeaderProps extends BaseProps {
11
12
  text?: React.ReactNode;
12
13
  }
13
14
  export default class NavHeader extends PureComponent<NavHeaderProps> {
14
- static contextType: React.Context<{
15
- isCollapsed: boolean;
16
- selectedKeys: any[];
17
- openKeys: any[];
18
- }>;
15
+ static contextType: React.Context<NavContextType>;
19
16
  static propTypes: {
20
17
  prefixCls: PropTypes.Requireable<string>;
21
- logo: PropTypes.Requireable<PropTypes.ReactNodeLike>;
18
+ logo: PropTypes.Requireable<object | PropTypes.ReactNodeLike>;
22
19
  text: PropTypes.Requireable<PropTypes.ReactNodeLike>;
23
20
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
24
21
  style: PropTypes.Requireable<object>;
@@ -29,6 +26,7 @@ export default class NavHeader extends PureComponent<NavHeaderProps> {
29
26
  static defaultProps: {
30
27
  prefixCls: string;
31
28
  };
29
+ context: NavContextType;
32
30
  renderLogo(logo: React.ReactNode): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
33
31
  render(): JSX.Element;
34
32
  }
@@ -2,6 +2,7 @@ import BaseComponent, { BaseProps } from '../_base/baseComponent';
2
2
  import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import ItemFoundation, { ItemAdapter, ItemProps, SelectedItemProps } from '@douyinfe/semi-foundation/lib/es/navigation/itemFoundation';
5
+ import { NavContextType } from './nav-context';
5
6
  export interface NavItemProps extends ItemProps, BaseProps {
6
7
  children?: React.ReactNode;
7
8
  disabled?: boolean;
@@ -25,11 +26,7 @@ export interface NavItemState {
25
26
  tooltipShow: boolean;
26
27
  }
27
28
  export default class NavItem extends BaseComponent<NavItemProps, NavItemState> {
28
- static contextType: React.Context<{
29
- isCollapsed: boolean;
30
- selectedKeys: any[];
31
- openKeys: any[];
32
- }>;
29
+ static contextType: React.Context<NavContextType>;
33
30
  static propTypes: {
34
31
  text: PropTypes.Requireable<PropTypes.ReactNodeLike>;
35
32
  itemKey: PropTypes.Requireable<string | number>;
@@ -60,6 +57,7 @@ export default class NavItem extends BaseComponent<NavItemProps, NavItemState> {
60
57
  disabled: boolean;
61
58
  };
62
59
  foundation: ItemFoundation;
60
+ context: NavContextType;
63
61
  constructor(props: NavItemProps);
64
62
  _invokeContextFunc(funcName: string, ...args: any[]): any;
65
63
  get adapter(): ItemAdapter<NavItemProps, NavItemState>;
@@ -68,5 +66,5 @@ export default class NavItem extends BaseComponent<NavItemProps, NavItemState> {
68
66
  wrapTooltip: (node: React.ReactNode) => JSX.Element;
69
67
  handleClick: (e: React.MouseEvent) => void;
70
68
  handleKeyPress: (e: React.KeyboardEvent) => void;
71
- render(): {} | React.ReactElement<any, string | React.JSXElementConstructor<any>>;
69
+ render(): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
72
70
  }
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  export interface OpenIconTransitionProps {
4
- children?: React.ReactNode;
4
+ children?: React.ReactNode | ((transitionArgus?: any) => React.ReactNode);
5
+ isCollapsed?: boolean;
5
6
  isOpen?: boolean;
6
7
  }
7
8
  declare function OpenIconTransition(props?: OpenIconTransitionProps): JSX.Element;
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import '@douyinfe/semi-foundation/lib/es/navigation/navigation.css';
5
5
  import SubNavFoundation, { SubNavAdapter } from '@douyinfe/semi-foundation/lib/es/navigation/subNavFoundation';
6
+ import { NavContextType } from './nav-context';
6
7
  export interface ToggleIcon {
7
8
  open?: string;
8
9
  closed?: string;
@@ -26,11 +27,7 @@ export interface SubNavState {
26
27
  isHovered: boolean;
27
28
  }
28
29
  export default class SubNav extends BaseComponent<SubNavProps, SubNavState> {
29
- static contextType: React.Context<{
30
- isCollapsed: boolean;
31
- selectedKeys: any[];
32
- openKeys: any[];
33
- }>;
30
+ static contextType: React.Context<NavContextType>;
34
31
  static propTypes: {
35
32
  /**
36
33
  * Unique identification
@@ -89,6 +86,7 @@ export default class SubNav extends BaseComponent<SubNavProps, SubNavState> {
89
86
  titleRef: React.RefObject<HTMLDivElement>;
90
87
  itemRef: React.RefObject<HTMLLIElement>;
91
88
  foundation: SubNavFoundation;
89
+ context: NavContextType;
92
90
  constructor(props: SubNavProps);
93
91
  setItemRef: (ref: HTMLLIElement | React.RefObject<HTMLLIElement>) => void;
94
92
  setTitleRef: (ref: HTMLDivElement | React.RefObject<HTMLDivElement>) => void;
@@ -111,12 +111,12 @@ export default class SubNav extends BaseComponent {
111
111
  getIsSelected: itemKey => {
112
112
  var _context;
113
113
 
114
- return Boolean(!isNullOrUndefined(itemKey) && _includesInstanceProperty(_context = _get(this.context, 'selectedKeys', [])).call(_context, itemKey));
114
+ return Boolean(!isNullOrUndefined(itemKey) && _includesInstanceProperty(_context = _get(this.context, 'selectedKeys', [])).call(_context, String(itemKey)));
115
115
  },
116
116
  getIsOpen: () => {
117
117
  var _context2;
118
118
 
119
- return Boolean(this.context && this.context.openKeys && _includesInstanceProperty(_context2 = this.context.openKeys).call(_context2, this.props.itemKey));
119
+ return Boolean(this.context && this.context.openKeys && _includesInstanceProperty(_context2 = this.context.openKeys).call(_context2, String(this.props.itemKey)));
120
120
  }
121
121
  });
122
122
  }
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
3
  import { Motion } from '@douyinfe/semi-foundation/lib/es/utils/type';
4
4
  export interface SubNavTransitionProps {
5
- children?: React.ReactNode;
5
+ children?: React.ReactNode | ((transitionProps?: any) => React.ReactNode);
6
6
  isCollapsed?: boolean;
7
7
  maxHeight?: number;
8
8
  motion?: Motion;
@@ -107,8 +107,8 @@ declare class Nav extends BaseComponent<NavProps, NavState> {
107
107
  className: PropTypes.Requireable<string>;
108
108
  toggleIconPosition: PropTypes.Requireable<string>;
109
109
  prefixCls: PropTypes.Requireable<string>;
110
- header: PropTypes.Requireable<PropTypes.ReactNodeLike>;
111
- footer: PropTypes.Requireable<PropTypes.ReactNodeLike>;
110
+ header: PropTypes.Requireable<object | PropTypes.ReactNodeLike>;
111
+ footer: PropTypes.Requireable<object | PropTypes.ReactNodeLike>;
112
112
  limitIndent: PropTypes.Requireable<boolean>;
113
113
  };
114
114
  static defaultProps: {
@@ -1,7 +1,23 @@
1
1
  import React from 'react';
2
- declare const NavContext: React.Context<{
3
- isCollapsed: boolean;
4
- selectedKeys: any[];
5
- openKeys: any[];
6
- }>;
2
+ import { NavProps } from './index';
3
+ import { Locale } from '../locale/interface';
4
+ export interface NavContextType {
5
+ isCollapsed?: boolean;
6
+ mode?: NavProps['mode'];
7
+ openKeys?: string[];
8
+ onCollapseChange?: NavProps['onCollapseChange'];
9
+ prefixCls?: string;
10
+ selectedKeys?: string[];
11
+ toggleIconPosition?: string;
12
+ selectedKeysIsControlled?: boolean;
13
+ openKeysIsControlled?: boolean;
14
+ limitIndent?: boolean;
15
+ isInSubNav?: boolean;
16
+ locale?: Locale['Navigation'];
17
+ subNavMotion?: NavProps['subNavMotion'];
18
+ subNavCloseDelay?: NavProps['subNavCloseDelay'];
19
+ subNavOpenDelay?: NavProps['subNavOpenDelay'];
20
+ canUpdateOpenKeys?: boolean;
21
+ }
22
+ declare const NavContext: React.Context<NavContextType>;
7
23
  export default NavContext;
@@ -1,10 +1,10 @@
1
- import React, { JSXElementConstructor } from 'react';
1
+ import React from 'react';
2
2
  import { NoticePosition } from '@douyinfe/semi-foundation/lib/es/notification/notificationFoundation';
3
3
  import { Motion } from '../_base/base';
4
4
  export declare type ArgsType<T> = T extends (...args: infer A) => any ? A : never;
5
5
  export interface NoticeTransitionProps {
6
6
  position?: NoticePosition;
7
7
  motion?: Motion<NoticeTransitionProps>;
8
- children?: JSXElementConstructor<any> | React.ReactChildren;
8
+ children?: React.ReactNode | ((TransitionProps?: any) => React.ReactNode);
9
9
  }
10
10
  export default function NoticeTransition(props?: NoticeTransitionProps): JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import React, { CSSProperties } from 'react';
2
2
  import PropTypes from 'prop-types';
3
+ import { ContextValue } from '../configProvider/context';
3
4
  import { ConfigProps, NotificationListAdapter, NotificationListProps, NotificationListState } from '@douyinfe/semi-foundation/lib/es/notification/notificationListFoundation';
4
5
  import BaseComponent from '../_base/baseComponent';
5
6
  import '@douyinfe/semi-foundation/lib/es/notification/notification.css';
@@ -19,7 +20,7 @@ export declare type NoticesInPosition = {
19
20
  bottomRight: NoticeInstance[];
20
21
  };
21
22
  declare class NotificationList extends BaseComponent<NotificationListProps, NotificationListState> {
22
- static contextType: React.Context<import("../configProvider/context").ContextValue>;
23
+ static contextType: React.Context<ContextValue>;
23
24
  static propTypes: {
24
25
  style: PropTypes.Requireable<object>;
25
26
  className: PropTypes.Requireable<string>;
@@ -31,6 +32,7 @@ declare class NotificationList extends BaseComponent<NotificationListProps, Noti
31
32
  private noticeStorage;
32
33
  private removeItemStorage;
33
34
  constructor(props: NotificationListProps);
35
+ context: ContextValue;
34
36
  get adapter(): NotificationListAdapter;
35
37
  static addNotice(notice: NoticeProps): string;
36
38
  static removeNotice(id: string): string;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
+ import { ContextValue } from '../configProvider/context';
3
4
  import { NoticeAdapter, NoticeProps, NoticeState } from '@douyinfe/semi-foundation/lib/es/notification/notificationFoundation';
4
5
  import BaseComponent from '../_base/baseComponent';
5
6
  export interface NoticeReactProps extends NoticeProps {
@@ -10,7 +11,7 @@ export interface NoticeReactProps extends NoticeProps {
10
11
  onClick?: (e: React.MouseEvent) => void;
11
12
  }
12
13
  declare class Notice extends BaseComponent<NoticeReactProps, NoticeState> {
13
- static contextType: React.Context<import("../configProvider/context").ContextValue>;
14
+ static contextType: React.Context<ContextValue>;
14
15
  static propTypes: {
15
16
  duration: PropTypes.Requireable<number>;
16
17
  id: PropTypes.Requireable<string | number>;
@@ -40,6 +41,7 @@ declare class Notice extends BaseComponent<NoticeReactProps, NoticeState> {
40
41
  };
41
42
  get adapter(): NoticeAdapter;
42
43
  constructor(props: NoticeReactProps);
44
+ context: ContextValue;
43
45
  componentWillUnmount(): void;
44
46
  renderTypeIcon(): JSX.Element;
45
47
  clearCloseTimer: () => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import '@douyinfe/semi-foundation/lib/es/notification/notification.css';
2
3
  import { NoticeProps } from '@douyinfe/semi-foundation/lib/es/notification/notificationFoundation';
3
4
  export default function useNotification(): (JSX.Element | {
@@ -1,8 +1,9 @@
1
- import React, { ReactNode } from 'react';
1
+ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  export interface ReactIntersectionObserverProps {
4
4
  onIntersect?: IntersectionObserverCallback;
5
5
  option?: IntersectionObserverInit;
6
+ children?: React.ReactNode;
6
7
  root?: IntersectionObserverInit['root'];
7
8
  threshold?: IntersectionObserverInit['threshold'];
8
9
  rootMargin?: IntersectionObserverInit['rootMargin'];
@@ -30,5 +31,5 @@ export default class ReactIntersectionObserver extends React.PureComponent<React
30
31
  componentDidUpdate(): void;
31
32
  componentWillUnmount(): void;
32
33
  observeElement(force?: boolean): void;
33
- render(): ReactNode;
34
+ render(): React.ReactNode;
34
35
  }
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { PageList, PaginationAdapter } from '@douyinfe/semi-foundation/lib/es/pagination/foundation';
4
4
  import '@douyinfe/semi-foundation/lib/es/pagination/pagination.css';
5
+ import { ContextValue } from '../configProvider/context';
5
6
  import { Locale } from '../locale/interface';
6
7
  import BaseComponent from '../_base/baseComponent';
7
8
  import { Position } from '../tooltip';
@@ -43,7 +44,7 @@ export declare type PaginationLocale = Locale['Pagination'];
43
44
  export declare type PopoverPosition = Position;
44
45
  export { PageList };
45
46
  export default class Pagination extends BaseComponent<PaginationProps, PaginationState> {
46
- static contextType: React.Context<import("../configProvider/context").ContextValue>;
47
+ static contextType: React.Context<ContextValue>;
47
48
  static propTypes: {
48
49
  total: PropTypes.Requireable<number>;
49
50
  showTotal: PropTypes.Requireable<boolean>;
@@ -83,6 +84,7 @@ export default class Pagination extends BaseComponent<PaginationProps, Paginatio
83
84
  showQuickJumper: boolean;
84
85
  };
85
86
  constructor(props: PaginationProps);
87
+ context: ContextValue;
86
88
  get adapter(): PaginationAdapter<PaginationProps, PaginationState>;
87
89
  componentDidMount(): void;
88
90
  componentWillUnmount(): void;
@@ -330,17 +330,21 @@ export default class Pagination extends BaseComponent {
330
330
 
331
331
  const itemHeight = 32;
332
332
  const listHeight = count >= 5 ? itemHeight * 5 : itemHeight * count;
333
- return /*#__PURE__*/React.createElement(List, {
334
- className: "".concat(prefixCls, "-rest-list"),
335
- itemData: restList,
336
- itemSize: itemHeight,
337
- width: 78,
338
- itemCount: count,
339
- height: listHeight,
340
- style: {
341
- direction
342
- }
343
- }, row);
333
+ return (
334
+ /*#__PURE__*/
335
+ // @ts-ignore skip type check cause react-window not update with @types/react 18
336
+ React.createElement(List, {
337
+ className: "".concat(prefixCls, "-rest-list"),
338
+ itemData: restList,
339
+ itemSize: itemHeight,
340
+ width: 78,
341
+ itemCount: count,
342
+ height: listHeight,
343
+ style: {
344
+ direction
345
+ }
346
+ }, row)
347
+ );
344
348
  }
345
349
 
346
350
  renderSmallPage(locale) {
@@ -6,6 +6,7 @@ import { PopoverProps } from '../popover';
6
6
  import { Position, Trigger } from '../tooltip';
7
7
  import { ButtonProps } from '../button';
8
8
  import { Type as ButtonType } from '../button/Button';
9
+ import { ContextValue } from '../configProvider/context';
9
10
  import '@douyinfe/semi-foundation/lib/es/popconfirm/popconfirm.css';
10
11
  import { Motion } from '../_base/base';
11
12
  export interface PopconfirmProps extends PopoverProps {
@@ -35,7 +36,7 @@ export interface PopconfirmState {
35
36
  visible: boolean;
36
37
  }
37
38
  export default class Popconfirm extends BaseComponent<PopconfirmProps, PopconfirmState> {
38
- static contextType: React.Context<import("../configProvider/context").ContextValue>;
39
+ static contextType: React.Context<ContextValue>;
39
40
  static propTypes: {
40
41
  motion: PropTypes.Requireable<boolean | object>;
41
42
  disabled: PropTypes.Requireable<boolean>;
@@ -77,6 +78,7 @@ export default class Popconfirm extends BaseComponent<PopconfirmProps, Popconfir
77
78
  onClickOutSide: (...args: any[]) => void;
78
79
  };
79
80
  constructor(props: PopconfirmProps);
81
+ context: ContextValue;
80
82
  static getDerivedStateFromProps(props: PopconfirmProps, state: PopconfirmState): Partial<PopconfirmState>;
81
83
  get adapter(): PopconfirmAdapter<PopconfirmProps, PopconfirmState>;
82
84
  handleCancel: (e: React.MouseEvent) => void;
@@ -86,5 +88,5 @@ export default class Popconfirm extends BaseComponent<PopconfirmProps, Popconfir
86
88
  stopImmediatePropagation: (e: React.SyntheticEvent) => void;
87
89
  renderControls(): JSX.Element;
88
90
  renderConfirmPopCard(): JSX.Element;
89
- render(): React.ReactNode;
91
+ render(): string | number | boolean | React.ReactFragment | JSX.Element;
90
92
  }
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
+ import { ContextValue } from '../configProvider/context';
3
4
  import { ArrowBounding, Position, TooltipProps, Trigger, RenderContentProps } from '../tooltip/index';
4
5
  import '@douyinfe/semi-foundation/lib/es/popover/popover.css';
5
6
  import { BaseProps } from '../_base/baseComponent';
@@ -42,10 +43,10 @@ export interface PopoverState {
42
43
  popConfirmVisible: boolean;
43
44
  }
44
45
  declare class Popover extends React.PureComponent<PopoverProps, PopoverState> {
45
- static contextType: React.Context<import("../configProvider/context").ContextValue>;
46
+ static contextType: React.Context<ContextValue>;
46
47
  static propTypes: {
47
48
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
48
- content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
49
+ content: PropTypes.Requireable<PropTypes.ReactNodeLike | ((...args: any[]) => any)>;
49
50
  visible: PropTypes.Requireable<boolean>;
50
51
  autoAdjustOverflow: PropTypes.Requireable<boolean>;
51
52
  motion: PropTypes.Requireable<boolean | object>;
@@ -92,6 +93,7 @@ declare class Popover extends React.PureComponent<PopoverProps, PopoverState> {
92
93
  returnFocusOnClose: boolean;
93
94
  guardFocus: boolean;
94
95
  };
96
+ context: ContextValue;
95
97
  renderPopCard: ({ initialFocusRef }: {
96
98
  initialFocusRef: RenderContentProps['initialFocusRef'];
97
99
  }) => JSX.Element;
@@ -33,7 +33,7 @@ declare class Progress extends Component<ProgressProps, ProgressState> {
33
33
  'aria-valuetext': PropTypes.Requireable<string>;
34
34
  className: PropTypes.Requireable<string>;
35
35
  direction: PropTypes.Requireable<string>;
36
- format: PropTypes.Requireable<PropTypes.ReactNodeLike>;
36
+ format: PropTypes.Requireable<PropTypes.ReactNodeLike | ((...args: any[]) => any)>;
37
37
  id: PropTypes.Requireable<string>;
38
38
  motion: PropTypes.Requireable<boolean | object>;
39
39
  orbitStroke: PropTypes.Requireable<string>;
@@ -12,6 +12,7 @@ export declare type RadioType = typeof strings.TYPE_DEFAULT | typeof strings.TYP
12
12
  export declare type RadioProps = {
13
13
  autoFocus?: boolean;
14
14
  checked?: boolean;
15
+ children?: React.ReactNode | undefined;
15
16
  defaultChecked?: boolean;
16
17
  value?: string | number;
17
18
  disabled?: boolean;
@@ -24,6 +24,7 @@ export declare type RadioGroupProps = {
24
24
  value?: string | number;
25
25
  onChange?: (event: RadioChangeEvent) => void;
26
26
  className?: string;
27
+ children?: React.ReactNode | undefined;
27
28
  style?: React.CSSProperties;
28
29
  direction?: ArrayElement<typeof strings.DIRECTION_SET>;
29
30
  mode?: RadioMode;
@@ -1,5 +1,6 @@
1
1
  import React, { MouseEvent } from 'react';
2
2
  import PropTypes from 'prop-types';
3
+ import { ContextValue } from '../configProvider/context';
3
4
  import SelectFoundation, { SelectAdapter } from '@douyinfe/semi-foundation/lib/es/select/foundation';
4
5
  import BaseComponent, { ValidateStatus } from '../_base/baseComponent';
5
6
  import { InputProps } from '../input/index';
@@ -137,7 +138,7 @@ export interface SelectState {
137
138
  isHovering: boolean;
138
139
  }
139
140
  declare class Select extends BaseComponent<SelectProps, SelectState> {
140
- static contextType: React.Context<import("../configProvider/context").ContextValue>;
141
+ static contextType: React.Context<ContextValue>;
141
142
  static Option: typeof Option;
142
143
  static OptGroup: typeof OptionGroup;
143
144
  static propTypes: {
@@ -222,6 +223,7 @@ declare class Select extends BaseComponent<SelectProps, SelectState> {
222
223
  selectOptionListID: string;
223
224
  clickOutsideHandler: (e: MouseEvent) => void;
224
225
  foundation: SelectFoundation;
226
+ context: ContextValue;
225
227
  constructor(props: SelectProps);
226
228
  get adapter(): SelectAdapter<SelectProps, SelectState>;
227
229
  componentDidMount(): void;
@@ -10,7 +10,7 @@ export interface OptionGroupProps {
10
10
  declare class OptionGroup extends BaseComponent<OptionGroupProps> {
11
11
  static isSelectOptionGroup: boolean;
12
12
  static propTypes: {
13
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
13
+ children: PropTypes.Requireable<any[] | PropTypes.ReactNodeLike>;
14
14
  label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
15
15
  className: PropTypes.Requireable<string>;
16
16
  style: PropTypes.Requireable<object>;
@@ -13,6 +13,7 @@ export interface SideSheetContentProps {
13
13
  style: CSSProperties;
14
14
  bodyStyle?: CSSProperties;
15
15
  className: string;
16
+ children?: React.ReactNode | undefined;
16
17
  footer?: React.ReactNode;
17
18
  'aria-label'?: string;
18
19
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Motion } from '../_base/base';
3
3
  export interface SideSheetTransitionProps {
4
- children?: React.ReactChildren | React.JSXElementConstructor<any>;
4
+ children?: React.ReactNode | ((TransitionProps: any) => React.ReactNode);
5
5
  motion?: Motion<SideSheetTransitionProps>;
6
6
  controlled?: boolean;
7
7
  visible?: boolean;
@@ -1,6 +1,7 @@
1
1
  import React, { CSSProperties } from 'react';
2
2
  import BaseComponent from '../_base/baseComponent';
3
3
  import PropTypes from 'prop-types';
4
+ import { ContextValue } from '../configProvider/context';
4
5
  import { SideSheetAdapter, SideSheetProps, SideSheetState } from '@douyinfe/semi-foundation/lib/es/sideSheet/sideSheetFoundation';
5
6
  import '@douyinfe/semi-foundation/lib/es/sideSheet/sideSheet.css';
6
7
  export { SideSheetContentProps } from './SideSheetContent';
@@ -17,7 +18,7 @@ export interface SideSheetReactProps extends SideSheetProps {
17
18
  }
18
19
  export { SideSheetState };
19
20
  export default class SideSheet extends BaseComponent<SideSheetReactProps, SideSheetState> {
20
- static contextType: React.Context<import("../configProvider/context").ContextValue>;
21
+ static contextType: React.Context<ContextValue>;
21
22
  static propTypes: {
22
23
  bodyStyle: PropTypes.Requireable<object>;
23
24
  headerStyle: PropTypes.Requireable<object>;
@@ -48,6 +49,7 @@ export default class SideSheet extends BaseComponent<SideSheetReactProps, SideSh
48
49
  static defaultProps: SideSheetReactProps;
49
50
  private _active;
50
51
  constructor(props: SideSheetReactProps);
52
+ context: ContextValue;
51
53
  get adapter(): SideSheetAdapter;
52
54
  static getDerivedStateFromProps(props: SideSheetReactProps, prevState: SideSheetState): Partial<SideSheetState>;
53
55
  componentDidMount(): void;
@@ -52,7 +52,7 @@ export default class TableRow extends BaseComponent<BaseRowProps, Record<string,
52
52
  columns: PropTypes.Validator<any[]>;
53
53
  components: PropTypes.Validator<object>;
54
54
  disabled: PropTypes.Requireable<boolean>;
55
- expandIcon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
55
+ expandIcon: PropTypes.Requireable<PropTypes.ReactNodeLike | ((...args: any[]) => any)>;
56
56
  expandableRow: PropTypes.Requireable<boolean>;
57
57
  expanded: PropTypes.Requireable<boolean>;
58
58
  expandedRow: PropTypes.Requireable<boolean>;
@@ -1,6 +1,7 @@
1
1
  import React, { PureComponent, ReactNode } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import Store from '@douyinfe/semi-foundation/lib/es/utils/Store';
4
+ import { TableContextProps } from '../table-context';
4
5
  import { ColumnProps, ExpandIcon, TableComponents, Virtualized, Fixed } from '../interface';
5
6
  export interface TableExpandedRowProps {
6
7
  cellWidths: number[];
@@ -27,7 +28,7 @@ export interface TableExpandedRowProps {
27
28
  * Render expanded row
28
29
  */
29
30
  export default class TableExpandedRow extends PureComponent<TableExpandedRowProps> {
30
- static contextType: React.Context<import("../table-context").TableContextProps>;
31
+ static contextType: React.Context<TableContextProps>;
31
32
  static propTypes: {
32
33
  cellWidths: PropTypes.Validator<any[]>;
33
34
  className: PropTypes.Requireable<string>;
@@ -35,7 +36,7 @@ export default class TableExpandedRow extends PureComponent<TableExpandedRowProp
35
36
  components: PropTypes.Requireable<object>;
36
37
  defaultExpandAllRows: PropTypes.Requireable<boolean>;
37
38
  defaultExpandedRowKeys: PropTypes.Requireable<any[]>;
38
- expandIcon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
39
+ expandIcon: PropTypes.Requireable<object | PropTypes.ReactNodeLike>;
39
40
  expandRowByClick: PropTypes.Requireable<boolean>;
40
41
  expanded: PropTypes.Requireable<boolean>;
41
42
  expandedRowKeys: PropTypes.Requireable<any[]>;
@@ -55,6 +56,7 @@ export default class TableExpandedRow extends PureComponent<TableExpandedRowProp
55
56
  record: {};
56
57
  prefixCls: "semi-table";
57
58
  };
59
+ context: TableContextProps;
58
60
  render(): JSX.Element;
59
61
  }
60
62
  export declare type ExpandedRowRenderReturnType = React.ReactNode | {
@@ -1,6 +1,7 @@
1
1
  import React, { PureComponent, ReactNode } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import Store from '@douyinfe/semi-foundation/lib/es/utils/Store';
4
+ import { TableContextProps } from '../table-context';
4
5
  import { ColumnProps, RenderGroupSection, OnGroupedRow, TableComponents, Virtualized, RowKey, OnRowReturnObject } from '../interface';
5
6
  export interface SectionRowProps {
6
7
  record?: Record<string, any>;
@@ -27,7 +28,7 @@ export interface SectionRowProps {
27
28
  * Grouping component title row
28
29
  */
29
30
  declare class SectionRow extends PureComponent<SectionRowProps> {
30
- static contextType: React.Context<import("../table-context").TableContextProps>;
31
+ static contextType: React.Context<TableContextProps>;
31
32
  static propTypes: {
32
33
  record: PropTypes.Requireable<object>;
33
34
  index: PropTypes.Requireable<number>;
@@ -58,6 +59,7 @@ declare class SectionRow extends PureComponent<SectionRowProps> {
58
59
  };
59
60
  };
60
61
  };
62
+ context: TableContextProps;
61
63
  onRow: (...args: any[]) => OnRowReturnObject;
62
64
  collectGroupedData: () => Record<string, any>[];
63
65
  renderExpandIcon: (record: any) => React.ReactNode;
@@ -27,7 +27,7 @@ export default class Column extends React.PureComponent<ColumnProps> {
27
27
  sortDirections: import("prop-types").Requireable<string[]>;
28
28
  sortOrder: import("prop-types").Requireable<string | boolean>;
29
29
  sorter: import("prop-types").Requireable<boolean | ((...args: any[]) => any)>;
30
- title: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
30
+ title: import("prop-types").Requireable<import("prop-types").ReactNodeLike | ((...args: any[]) => any)>;
31
31
  useFullRender: import("prop-types").Requireable<boolean>;
32
32
  width: import("prop-types").Requireable<string | number>;
33
33
  };
@@ -25,7 +25,7 @@ declare const _default: {
25
25
  sortDirections: PropTypes.Requireable<string[]>;
26
26
  sortOrder: PropTypes.Requireable<string | boolean>;
27
27
  sorter: PropTypes.Requireable<boolean | ((...args: any[]) => any)>;
28
- title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
28
+ title: PropTypes.Requireable<PropTypes.ReactNodeLike | ((...args: any[]) => any)>;
29
29
  useFullRender: PropTypes.Requireable<boolean>;
30
30
  width: PropTypes.Requireable<string | number>;
31
31
  };
@@ -21,7 +21,7 @@ declare namespace CustomExpandIcon {
21
21
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
22
22
  onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
23
23
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
24
- expandIcon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
24
+ expandIcon: PropTypes.Requireable<PropTypes.ReactNodeLike | ((...args: any[]) => any)>;
25
25
  prefixCls: PropTypes.Requireable<string>;
26
26
  motion: PropTypes.Requireable<boolean>;
27
27
  };