@dtjoy/dt-design 1.0.6 → 1.0.8

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 (222) hide show
  1. package/esm/_util/easings.d.ts +1 -0
  2. package/esm/_util/easings.js +9 -0
  3. package/esm/_util/extendsObject.d.ts +4 -0
  4. package/esm/_util/extendsObject.js +17 -0
  5. package/esm/_util/gapSize.d.ts +3 -3
  6. package/esm/_util/getScroll.d.ts +3 -0
  7. package/esm/_util/getScroll.js +32 -0
  8. package/esm/_util/hooks/index.d.ts +4 -1
  9. package/esm/_util/hooks/index.js +4 -1
  10. package/esm/_util/hooks/useForceUpdate.d.ts +2 -0
  11. package/esm/_util/hooks/useForceUpdate.js +6 -0
  12. package/esm/_util/hooks/useOrientation.d.ts +2 -2
  13. package/esm/_util/hooks/useProxyImperativeHandle.d.ts +4 -0
  14. package/esm/_util/hooks/useProxyImperativeHandle.js +31 -0
  15. package/esm/_util/hooks/useSyncState.d.ts +3 -0
  16. package/esm/_util/hooks/useSyncState.js +20 -0
  17. package/esm/_util/index.d.ts +3 -3
  18. package/esm/_util/isNonNullable.d.ts +2 -2
  19. package/esm/_util/scrollTo.d.ts +10 -0
  20. package/esm/_util/scrollTo.js +38 -0
  21. package/esm/_util/type.d.ts +52 -52
  22. package/esm/_util/warning.d.ts +31 -31
  23. package/esm/_util/warning.js +5 -5
  24. package/esm/blockHeader/index.d.ts +50 -48
  25. package/esm/blockHeader/index.js +13 -15
  26. package/esm/blockHeader/style/index.d.ts +2 -2
  27. package/esm/blockHeader/style/index.less +143 -143
  28. package/esm/button/index.d.ts +10 -10
  29. package/esm/button/index.js +2 -2
  30. package/esm/button/style/index.d.ts +2 -2
  31. package/esm/collapsible/index.d.ts +102 -97
  32. package/esm/collapsible/index.js +53 -55
  33. package/esm/collapsible/style/index.d.ts +1 -1
  34. package/esm/collapsibleActionItems/index.d.ts +24 -24
  35. package/esm/collapsibleActionItems/index.js +2 -2
  36. package/esm/collapsibleActionItems/style/index.d.ts +2 -2
  37. package/esm/flex/index.d.ts +7 -7
  38. package/esm/flex/index.js +1 -1
  39. package/esm/flex/interface.d.ts +16 -16
  40. package/esm/flex/style/index.d.ts +2 -2
  41. package/esm/flex/style/index.less +76 -76
  42. package/esm/flex/utils.d.ts +7 -7
  43. package/esm/flex/utils.js +1 -1
  44. package/esm/formList/index.d.ts +78 -77
  45. package/esm/formList/index.js +13 -11
  46. package/esm/formList/style/index.d.ts +2 -2
  47. package/esm/formList/style/index.less +45 -45
  48. package/esm/index.d.ts +17 -14
  49. package/esm/index.js +3 -1
  50. package/esm/overflowList/index.d.ts +40 -39
  51. package/esm/overflowList/index.js +4 -3
  52. package/esm/overflowList/style/index.d.ts +2 -2
  53. package/esm/resize/index.d.ts +9 -8
  54. package/esm/resize/index.js +1 -1
  55. package/esm/resizeObserver/index.d.ts +45 -45
  56. package/esm/resizeObserver/index.js +3 -2
  57. package/esm/splitter/Panel.d.ts +7 -7
  58. package/esm/splitter/Panel.js +3 -3
  59. package/esm/splitter/SplitBar.d.ts +24 -24
  60. package/esm/splitter/SplitBar.js +8 -7
  61. package/esm/splitter/Splitter.d.ts +5 -5
  62. package/esm/splitter/Splitter.js +5 -4
  63. package/esm/splitter/hooks/sizeUtil.d.ts +3 -3
  64. package/esm/splitter/hooks/useItems.d.ts +14 -14
  65. package/esm/splitter/hooks/useItems.js +2 -2
  66. package/esm/splitter/hooks/useResizable.d.ts +10 -10
  67. package/esm/splitter/hooks/useResize.d.ts +6 -6
  68. package/esm/splitter/hooks/useResize.js +5 -5
  69. package/esm/splitter/hooks/useSizes.d.ts +4 -4
  70. package/esm/splitter/index.d.ts +8 -8
  71. package/esm/splitter/interface.d.ts +69 -69
  72. package/esm/splitter/style/index.d.ts +2 -2
  73. package/esm/statusTag/index.d.ts +29 -28
  74. package/esm/statusTag/index.js +8 -8
  75. package/esm/statusTag/style/index.d.ts +2 -2
  76. package/esm/style/index.d.ts +1 -1
  77. package/esm/style/index.less +1 -1
  78. package/esm/style/themes/index.less +2 -2
  79. package/esm/style/themes/variable.less +4 -0
  80. package/esm/table/InternalTable.d.ts +32 -0
  81. package/esm/table/InternalTable.js +429 -0
  82. package/esm/table/RcTable/VirtualTable.d.ts +2 -0
  83. package/esm/table/RcTable/VirtualTable.js +9 -0
  84. package/esm/table/RcTable/index.d.ts +2 -0
  85. package/esm/table/RcTable/index.js +9 -0
  86. package/esm/table/Table.d.ts +17 -0
  87. package/esm/table/Table.js +28 -0
  88. package/esm/table/TableMeasureRowContext.d.ts +3 -0
  89. package/esm/table/TableMeasureRowContext.js +3 -0
  90. package/esm/table/hooks/useContainerWidth.d.ts +1 -0
  91. package/esm/table/hooks/useContainerWidth.js +14 -0
  92. package/esm/table/index.d.ts +7 -0
  93. package/esm/table/index.js +2 -0
  94. package/esm/table/interface.d.ts +196 -0
  95. package/esm/table/interface.js +4 -0
  96. package/esm/table/style/bordered.less +141 -0
  97. package/esm/table/style/fixed.less +88 -0
  98. package/esm/table/style/index.d.ts +2 -0
  99. package/esm/table/style/index.js +2 -0
  100. package/esm/table/style/index.less +150 -0
  101. package/esm/table/style/selection.less +90 -0
  102. package/esm/table/style/sticky.less +55 -0
  103. package/esm/table/style/virtual.less +65 -0
  104. package/esm/table/util.d.ts +14 -0
  105. package/esm/table/util.js +33 -0
  106. package/lib/_util/easings.d.ts +1 -0
  107. package/lib/_util/easings.js +15 -0
  108. package/lib/_util/extendsObject.d.ts +4 -0
  109. package/lib/_util/extendsObject.js +20 -0
  110. package/lib/_util/gapSize.d.ts +3 -3
  111. package/lib/_util/getScroll.d.ts +3 -0
  112. package/lib/_util/getScroll.js +39 -0
  113. package/lib/_util/hooks/index.d.ts +4 -1
  114. package/lib/_util/hooks/index.js +33 -0
  115. package/lib/_util/hooks/useForceUpdate.d.ts +2 -0
  116. package/lib/_util/hooks/useForceUpdate.js +12 -0
  117. package/lib/_util/hooks/useOrientation.d.ts +2 -2
  118. package/lib/_util/hooks/useProxyImperativeHandle.d.ts +4 -0
  119. package/lib/_util/hooks/useProxyImperativeHandle.js +40 -0
  120. package/lib/_util/hooks/useSyncState.d.ts +3 -0
  121. package/lib/_util/hooks/useSyncState.js +19 -0
  122. package/lib/_util/index.d.ts +3 -3
  123. package/lib/_util/isNonNullable.d.ts +2 -2
  124. package/lib/_util/scrollTo.d.ts +10 -0
  125. package/lib/_util/scrollTo.js +44 -0
  126. package/lib/_util/type.d.ts +52 -52
  127. package/lib/_util/warning.d.ts +31 -31
  128. package/lib/_util/warning.js +7 -8
  129. package/lib/blockHeader/index.d.ts +50 -48
  130. package/lib/blockHeader/index.js +13 -12
  131. package/lib/blockHeader/style/index.d.ts +2 -2
  132. package/lib/blockHeader/style/index.less +143 -143
  133. package/lib/button/index.d.ts +10 -10
  134. package/lib/button/index.js +2 -2
  135. package/lib/button/style/index.d.ts +2 -2
  136. package/lib/collapsible/index.d.ts +102 -97
  137. package/lib/collapsible/index.js +49 -49
  138. package/lib/collapsible/style/index.d.ts +1 -1
  139. package/lib/collapsibleActionItems/index.d.ts +24 -24
  140. package/lib/collapsibleActionItems/index.js +2 -2
  141. package/lib/collapsibleActionItems/style/index.d.ts +2 -2
  142. package/lib/flex/index.d.ts +7 -7
  143. package/lib/flex/index.js +2 -2
  144. package/lib/flex/interface.d.ts +16 -16
  145. package/lib/flex/style/index.d.ts +2 -2
  146. package/lib/flex/style/index.less +76 -76
  147. package/lib/flex/utils.d.ts +7 -7
  148. package/lib/flex/utils.js +2 -2
  149. package/lib/formList/index.d.ts +78 -77
  150. package/lib/formList/index.js +10 -10
  151. package/lib/formList/style/index.d.ts +2 -2
  152. package/lib/formList/style/index.less +45 -45
  153. package/lib/index.d.ts +17 -14
  154. package/lib/index.js +21 -2
  155. package/lib/overflowList/index.d.ts +40 -39
  156. package/lib/overflowList/index.js +4 -3
  157. package/lib/overflowList/style/index.d.ts +2 -2
  158. package/lib/resize/index.d.ts +9 -8
  159. package/lib/resize/index.js +1 -1
  160. package/lib/resizeObserver/index.d.ts +45 -45
  161. package/lib/resizeObserver/index.js +3 -2
  162. package/lib/splitter/Panel.d.ts +7 -7
  163. package/lib/splitter/Panel.js +3 -3
  164. package/lib/splitter/SplitBar.d.ts +24 -24
  165. package/lib/splitter/SplitBar.js +8 -7
  166. package/lib/splitter/Splitter.d.ts +5 -5
  167. package/lib/splitter/Splitter.js +5 -4
  168. package/lib/splitter/hooks/sizeUtil.d.ts +3 -3
  169. package/lib/splitter/hooks/useItems.d.ts +14 -14
  170. package/lib/splitter/hooks/useItems.js +2 -2
  171. package/lib/splitter/hooks/useResizable.d.ts +10 -10
  172. package/lib/splitter/hooks/useResize.d.ts +6 -6
  173. package/lib/splitter/hooks/useResize.js +5 -5
  174. package/lib/splitter/hooks/useSizes.d.ts +4 -4
  175. package/lib/splitter/index.d.ts +8 -8
  176. package/lib/splitter/interface.d.ts +69 -69
  177. package/lib/splitter/style/index.d.ts +2 -2
  178. package/lib/statusTag/index.d.ts +29 -28
  179. package/lib/statusTag/index.js +8 -8
  180. package/lib/statusTag/style/index.d.ts +2 -2
  181. package/lib/style/index.d.ts +1 -1
  182. package/lib/style/index.less +1 -1
  183. package/lib/style/themes/index.less +2 -2
  184. package/lib/style/themes/variable.less +4 -0
  185. package/lib/table/InternalTable.d.ts +32 -0
  186. package/lib/table/InternalTable.js +395 -0
  187. package/lib/table/RcTable/VirtualTable.d.ts +2 -0
  188. package/lib/table/RcTable/VirtualTable.js +17 -0
  189. package/lib/table/RcTable/index.d.ts +2 -0
  190. package/lib/table/RcTable/index.js +17 -0
  191. package/lib/table/Table.d.ts +17 -0
  192. package/lib/table/Table.js +37 -0
  193. package/lib/table/TableMeasureRowContext.d.ts +3 -0
  194. package/lib/{_util/zindexContext.js → table/TableMeasureRowContext.js} +2 -5
  195. package/lib/table/hooks/useContainerWidth.d.ts +1 -0
  196. package/lib/table/hooks/useContainerWidth.js +20 -0
  197. package/lib/table/index.d.ts +7 -0
  198. package/lib/table/index.js +9 -0
  199. package/lib/table/interface.d.ts +196 -0
  200. package/lib/table/interface.js +8 -0
  201. package/lib/table/style/bordered.less +141 -0
  202. package/lib/table/style/fixed.less +88 -0
  203. package/lib/table/style/index.d.ts +2 -0
  204. package/lib/table/style/index.js +4 -0
  205. package/lib/table/style/index.less +150 -0
  206. package/lib/table/style/selection.less +90 -0
  207. package/lib/table/style/sticky.less +55 -0
  208. package/lib/table/style/virtual.less +65 -0
  209. package/lib/table/util.d.ts +14 -0
  210. package/lib/table/util.js +44 -0
  211. package/package.json +82 -66
  212. package/esm/_util/convertToTooltipProps.d.ts +0 -4
  213. package/esm/_util/convertToTooltipProps.js +0 -15
  214. package/esm/_util/hooks/useZIndex.d.ts +0 -8
  215. package/esm/_util/hooks/useZIndex.js +0 -51
  216. package/esm/_util/zindexContext.d.ts +0 -3
  217. package/esm/_util/zindexContext.js +0 -6
  218. package/lib/_util/convertToTooltipProps.d.ts +0 -4
  219. package/lib/_util/convertToTooltipProps.js +0 -21
  220. package/lib/_util/hooks/useZIndex.d.ts +0 -8
  221. package/lib/_util/hooks/useZIndex.js +0 -59
  222. package/lib/_util/zindexContext.d.ts +0 -3
@@ -0,0 +1,196 @@
1
+ import type * as React from 'react';
2
+ import type { Reference } from '@rc-component/table';
3
+ import type { ExpandableConfig, FixedType, GetComponentProps, GetRowKey, ColumnType as RcColumnType, RenderedCell as RcRenderedCell } from '@rc-component/table/lib/interface';
4
+ import type { CheckboxProps, DropdownProps, PaginationProps, TooltipProps } from 'antd';
5
+ import type { Breakpoint } from 'antd/lib/_util/responsiveObserve';
6
+ import type { INTERNAL_SELECTION_ITEM } from 'antd/lib/table/hooks/useSelection';
7
+ import type { AnyObject } from '../_util/type';
8
+ import type { InternalTableProps, TableProps } from './InternalTable';
9
+ export type RefTable = <RecordType = AnyObject>(props: React.PropsWithChildren<TableProps<RecordType>> & React.RefAttributes<Reference>) => React.ReactElement;
10
+ export type RefInternalTable = <RecordType = AnyObject>(props: React.PropsWithChildren<InternalTableProps<RecordType>> & React.RefAttributes<Reference>) => React.ReactElement;
11
+ export type { ExpandableConfig, GetRowKey };
12
+ export type Key = React.Key;
13
+ export type SafeKey = Exclude<Key, bigint>;
14
+ export type RowSelectionType = 'checkbox' | 'radio';
15
+ export type SelectionItemSelectFn = (currentRowKeys: Key[]) => void;
16
+ export type ExpandType = null | 'row' | 'nest';
17
+ export interface TableLocale {
18
+ filterTitle?: string;
19
+ filterConfirm?: React.ReactNode;
20
+ filterReset?: React.ReactNode;
21
+ filterEmptyText?: React.ReactNode;
22
+ /**
23
+ * @deprecated Please use `filterCheckAll` instead.
24
+ */
25
+ filterCheckall?: React.ReactNode;
26
+ filterCheckAll?: React.ReactNode;
27
+ filterSearchPlaceholder?: string;
28
+ emptyText?: React.ReactNode | (() => React.ReactNode);
29
+ selectAll?: React.ReactNode;
30
+ selectNone?: React.ReactNode;
31
+ selectInvert?: React.ReactNode;
32
+ selectionAll?: React.ReactNode;
33
+ sortTitle?: string;
34
+ expand?: string;
35
+ collapse?: string;
36
+ triggerDesc?: string;
37
+ triggerAsc?: string;
38
+ cancelSort?: string;
39
+ }
40
+ export type SortOrder = 'descend' | 'ascend' | null;
41
+ export type SorterTooltipTarget = 'full-header' | 'sorter-icon';
42
+ export type SorterTooltipProps = TooltipProps & {
43
+ target?: SorterTooltipTarget;
44
+ };
45
+ declare const _TableActions: readonly ["paginate", "sort", "filter"];
46
+ export type TableAction = (typeof _TableActions)[number];
47
+ export type CompareFn<T = AnyObject> = (a: T, b: T, sortOrder?: SortOrder) => number;
48
+ export interface ColumnFilterItem {
49
+ text: React.ReactNode;
50
+ value: React.Key | boolean;
51
+ children?: ColumnFilterItem[];
52
+ }
53
+ export interface ColumnTitleProps<RecordType = AnyObject> {
54
+ /** @deprecated Will be remove in v7, Please use `sorterColumns` instead. */
55
+ sortOrder?: SortOrder;
56
+ /** @deprecated Will be remove in v7, Please use `sorterColumns` instead. */
57
+ sortColumn?: ColumnType<RecordType>;
58
+ sortColumns?: {
59
+ column: ColumnType<RecordType>;
60
+ order: SortOrder;
61
+ }[];
62
+ filters?: Record<string, FilterValue>;
63
+ }
64
+ export type ColumnTitle<RecordType = AnyObject> = React.ReactNode | ((props: ColumnTitleProps<RecordType>) => React.ReactNode);
65
+ export type FilterValue = (Key | boolean)[];
66
+ export type FilterKey = (string | number)[] | null;
67
+ export type FilterSearchType<RecordType = AnyObject> = boolean | ((input: string, record: RecordType) => boolean);
68
+ export interface FilterConfirmProps {
69
+ closeDropdown: boolean;
70
+ }
71
+ export interface FilterRestProps {
72
+ confirm?: boolean;
73
+ closeDropdown?: boolean;
74
+ }
75
+ export interface FilterDropdownProps {
76
+ prefixCls: string;
77
+ setSelectedKeys: (selectedKeys: React.Key[]) => void;
78
+ selectedKeys: React.Key[];
79
+ /**
80
+ * Confirm filter value, if you want to close dropdown before commit, you can call with
81
+ * {closeDropdown: true}
82
+ */
83
+ confirm: (param?: FilterConfirmProps) => void;
84
+ clearFilters?: (param?: FilterRestProps) => void;
85
+ filters?: ColumnFilterItem[];
86
+ /** Only close filterDropdown */
87
+ close: () => void;
88
+ visible: boolean;
89
+ }
90
+ interface CoverableDropdownProps extends Omit<DropdownProps, 'onOpenChange' | 'overlay' | 'visible' | 'onVisibleChange'> {
91
+ onOpenChange?: (open: boolean) => void;
92
+ }
93
+ export interface ColumnType<RecordType = AnyObject> extends Omit<RcColumnType<RecordType>, 'title'> {
94
+ title?: ColumnTitle<RecordType>;
95
+ sorter?: boolean | CompareFn<RecordType> | {
96
+ compare?: CompareFn<RecordType>;
97
+ /** Config multiple sorter order priority */
98
+ multiple?: number;
99
+ };
100
+ sortOrder?: SortOrder;
101
+ defaultSortOrder?: SortOrder;
102
+ sortDirections?: SortOrder[];
103
+ sortIcon?: (props: {
104
+ sortOrder: SortOrder;
105
+ }) => React.ReactNode;
106
+ showSorterTooltip?: boolean | SorterTooltipProps;
107
+ filtered?: boolean;
108
+ filters?: ColumnFilterItem[];
109
+ filterDropdown?: React.ReactNode | ((props: FilterDropdownProps) => React.ReactNode);
110
+ filterOnClose?: boolean;
111
+ filterMultiple?: boolean;
112
+ filteredValue?: FilterValue | null;
113
+ defaultFilteredValue?: FilterValue | null;
114
+ filterIcon?: React.ReactNode | ((filtered: boolean) => React.ReactNode);
115
+ filterMode?: 'menu' | 'tree';
116
+ filterSearch?: FilterSearchType<ColumnFilterItem>;
117
+ onFilter?: (value: React.Key | boolean, record: RecordType) => boolean;
118
+ /**
119
+ * Can cover `<Dropdown>` props
120
+ * @since 5.22.0
121
+ */
122
+ filterDropdownProps?: CoverableDropdownProps;
123
+ filterResetToDefaultFilteredValue?: boolean;
124
+ responsive?: Breakpoint[];
125
+ /**
126
+ * @deprecated Please use `filterDropdownProps.open` instead.
127
+ * @since 4.23.0
128
+ */
129
+ filterDropdownOpen?: boolean;
130
+ /**
131
+ * @deprecated Please use `filterDropdownProps.onOpenChange` instead.
132
+ * @since 4.23.0
133
+ */
134
+ onFilterDropdownOpenChange?: (visible: boolean) => void;
135
+ }
136
+ export interface ColumnGroupType<RecordType = AnyObject> extends Omit<ColumnType<RecordType>, 'dataIndex'> {
137
+ children: ColumnsType<RecordType>;
138
+ }
139
+ export type ColumnsType<RecordType = AnyObject> = (ColumnGroupType<RecordType> | ColumnType<RecordType>)[];
140
+ export interface SelectionItem {
141
+ key: string;
142
+ text: React.ReactNode;
143
+ onSelect?: SelectionItemSelectFn;
144
+ }
145
+ export type SelectionSelectFn<T = AnyObject> = (record: T, selected: boolean, selectedRows: T[], nativeEvent: Event) => void;
146
+ export type RowSelectMethod = 'all' | 'none' | 'invert' | 'single' | 'multiple';
147
+ export interface TableRowSelection<T = AnyObject> {
148
+ /** Keep the selection keys in list even the key not exist in `dataSource` anymore */
149
+ preserveSelectedRowKeys?: boolean;
150
+ type?: RowSelectionType;
151
+ selectedRowKeys?: Key[];
152
+ defaultSelectedRowKeys?: Key[];
153
+ onChange?: (selectedRowKeys: Key[], selectedRows: T[], info: {
154
+ type: RowSelectMethod;
155
+ }) => void;
156
+ getCheckboxProps?: (record: T) => Partial<Omit<CheckboxProps, 'checked' | 'defaultChecked'>>;
157
+ onSelect?: SelectionSelectFn<T>;
158
+ /** @deprecated This function will be remove in v7 and should use `onChange` instead */
159
+ onSelectMultiple?: (selected: boolean, selectedRows: T[], changeRows: T[]) => void;
160
+ /** @deprecated This function will be remove in v7 and should use `onChange` instead */
161
+ onSelectAll?: (selected: boolean, selectedRows: T[], changeRows: T[]) => void;
162
+ /** @deprecated This function will be remove in v7 and should use `onChange` instead */
163
+ onSelectInvert?: (selectedRowKeys: Key[]) => void;
164
+ /** @deprecated This function will be remove in v7 and should use `onChange` instead */
165
+ onSelectNone?: () => void;
166
+ selections?: INTERNAL_SELECTION_ITEM[] | boolean;
167
+ hideSelectAll?: boolean;
168
+ fixed?: FixedType;
169
+ columnWidth?: string | number;
170
+ columnTitle?: React.ReactNode | ((checkboxNode: React.ReactNode) => React.ReactNode);
171
+ checkStrictly?: boolean;
172
+ /** Set the alignment of the selection column */
173
+ align?: 'left' | 'center' | 'right';
174
+ renderCell?: (value: boolean, record: T, index: number, originNode: React.ReactNode) => React.ReactNode | RcRenderedCell<T>;
175
+ onCell?: GetComponentProps<T>;
176
+ getTitleCheckboxProps?: () => Partial<Omit<CheckboxProps, 'checked' | 'defaultChecked'>> & React.AriaAttributes;
177
+ }
178
+ export type TransformColumns<RecordType = AnyObject> = (columns: ColumnsType<RecordType>) => ColumnsType<RecordType>;
179
+ export interface TableCurrentDataSource<RecordType = AnyObject> {
180
+ currentDataSource: RecordType[];
181
+ action: TableAction;
182
+ }
183
+ export interface SorterResult<RecordType = AnyObject> {
184
+ column?: ColumnType<RecordType>;
185
+ order?: SortOrder;
186
+ field?: Key | readonly Key[];
187
+ columnKey?: Key;
188
+ }
189
+ export type GetPopupContainer = (triggerNode: HTMLElement) => HTMLElement;
190
+ export type TablePaginationPlacement = 'topStart' | 'topCenter' | 'topEnd' | 'bottomStart' | 'bottomCenter' | 'bottomEnd' | 'none';
191
+ export type TablePaginationPosition = 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight' | 'none';
192
+ export interface TablePaginationConfig extends PaginationProps {
193
+ placement?: TablePaginationPlacement[];
194
+ /** @deprecated please use `placement` instead */
195
+ position?: TablePaginationPosition[];
196
+ }
@@ -0,0 +1,4 @@
1
+ var _TableActions = ['paginate', 'sort', 'filter'];
2
+
3
+ // 非必要请勿导出
4
+ export {};
@@ -0,0 +1,141 @@
1
+ @import '../../style/themes/index.less';
2
+
3
+ @table-prefix-cls: ~'@{ant-prefix}-table';
4
+
5
+ .@{table-prefix-cls}-wrapper {
6
+ .@{table-prefix-cls}.@{table-prefix-cls}-bordered {
7
+ // ============================ Title 标题 =============================
8
+ > .@{table-prefix-cls}-title {
9
+ border: @border-width-base @border-style-base @border-color-base;
10
+ border-bottom: 0;
11
+ }
12
+
13
+ // ============================ Content 内容容器 ============================
14
+ > .@{table-prefix-cls}-container {
15
+ border-left: @border-width-base @border-style-base @border-color-base;
16
+ border-top: @border-width-base @border-style-base @border-color-base;
17
+
18
+ > .@{table-prefix-cls}-content,
19
+ > .@{table-prefix-cls}-header,
20
+ > .@{table-prefix-cls}-body,
21
+ > .@{table-prefix-cls}-summary {
22
+ > table {
23
+ // ============================= Cell 单元格 =============================
24
+ > thead > tr > th,
25
+ > thead > tr > td,
26
+ > tbody > tr > th,
27
+ > tbody > tr > td,
28
+ > tfoot > tr > th,
29
+ > tfoot > tr > td {
30
+ border-right: @border-width-base @border-style-base @border-color-base;
31
+ }
32
+
33
+ // ============================ Header 表头 ============================
34
+ > thead {
35
+ > tr:not(:last-child) > th {
36
+ border-bottom: @border-width-base @border-style-base @border-color-base;
37
+ }
38
+
39
+ > tr > th::before {
40
+ background-color: transparent !important;
41
+ }
42
+ }
43
+
44
+ > thead > tr,
45
+ > tbody > tr,
46
+ > tfoot > tr {
47
+ > .@{table-prefix-cls}-cell-fix-right-first::after {
48
+ border-right: @border-width-base @border-style-base @border-color-base;
49
+ }
50
+ }
51
+
52
+ // ========================== Expandable 展开行 ==========================
53
+ > tbody > tr > th,
54
+ > tbody > tr > td {
55
+ > .@{table-prefix-cls}-expanded-row-fixed {
56
+ // margin: calc(-@table-cell-padding-vertical)
57
+ // calc(-(@table-cell-padding-horizontal + @border-width-base));
58
+ &::after {
59
+ position: absolute;
60
+ top: 0;
61
+ right: @border-width-base;
62
+ bottom: 0;
63
+ border-right: @border-width-base @border-style-base @border-color-base;
64
+ content: '';
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }
71
+
72
+ // ============================ Scroll 水平滚动 ============================
73
+ &.@{table-prefix-cls}-scroll-horizontal {
74
+ > .@{table-prefix-cls}-container > .@{table-prefix-cls}-body {
75
+ > table > tbody {
76
+ > tr.@{table-prefix-cls}-expanded-row,
77
+ > tr.@{table-prefix-cls}-placeholder {
78
+ > th,
79
+ > td {
80
+ border-right: 0;
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
86
+
87
+ // ============================ Size 尺寸样式(middle/small) ============================
88
+ &.@{table-prefix-cls}-middle {
89
+ > .@{table-prefix-cls}-container {
90
+ > .@{table-prefix-cls}-content,
91
+ > .@{table-prefix-cls}-body {
92
+ > table > tbody > tr > th,
93
+ > table > tbody > tr > td {
94
+ > .@{table-prefix-cls}-expanded-row-fixed {
95
+ // margin: calc(-@table-cell-padding-vertical-middle)
96
+ // calc(-(@table-cell-padding-horizontal-middle + @border-width-base));
97
+ }
98
+ }
99
+ }
100
+ }
101
+ }
102
+
103
+ // small尺寸(对应原getSizeBorderStyle('small'))
104
+ &.@{table-prefix-cls}-small {
105
+ > .@{table-prefix-cls}-container {
106
+ > .@{table-prefix-cls}-content,
107
+ > .@{table-prefix-cls}-body {
108
+ > table > tbody > tr > th,
109
+ > table > tbody > tr > td {
110
+ > .@{table-prefix-cls}-expanded-row-fixed {
111
+ // margin: calc(-@table-cell-padding-vertical-small)
112
+ // calc(-(@table-cell-padding-horizontal-small + @border-width-base));
113
+ }
114
+ }
115
+ }
116
+ }
117
+ }
118
+
119
+ // ============================ Footer 页脚 ============================
120
+ > .@{table-prefix-cls}-footer {
121
+ border: @border-width-base @border-style-base @border-color-base;
122
+ border-top: 0;
123
+ }
124
+ }
125
+
126
+ // ============================ Nested 嵌套表格 ============================
127
+ .@{table-prefix-cls}-cell {
128
+ > .@{table-prefix-cls}-container:first-child {
129
+ border-top: 0;
130
+ }
131
+
132
+ &-scrollbar:not([rowspan]) {
133
+ // box-shadow: 0 @border-width-base 0 @border-width-base @table-header-background;
134
+ }
135
+ }
136
+
137
+ // 边框表格滚动条右侧边框
138
+ .@{table-prefix-cls}-bordered .@{table-prefix-cls}-cell-scrollbar {
139
+ border-right: @border-width-base @border-style-base @border-color-base;
140
+ }
141
+ }
@@ -0,0 +1,88 @@
1
+ @import '../../style/themes/index.less';
2
+
3
+ @table-prefix-cls: ~'@{ant-prefix}-table';
4
+ @cell-cls: ~'@{table-prefix-cls}-cell';
5
+ @fix-cell-cls: ~'@{table-prefix-cls}-cell-fix';
6
+
7
+ .shadow-left-style() {
8
+ box-shadow: inset 10px 0 8px -8px @border-color-split;
9
+ }
10
+
11
+ .shadow-right-style() {
12
+ box-shadow: inset -10px 0 8px -8px @border-color-split;
13
+ }
14
+
15
+ .shared-shadow-style() {
16
+ position: absolute;
17
+ top: 0;
18
+ bottom: calc(-@border-width-base);
19
+ width: 30px;
20
+ transition: box-shadow @motion-duration-slow;
21
+ content: '';
22
+ pointer-events: none;
23
+ }
24
+
25
+ .@{table-prefix-cls}-wrapper {
26
+ .@{cell-cls}.@{fix-cell-cls} {
27
+ position: sticky;
28
+ }
29
+
30
+ .@{fix-cell-cls} {
31
+ z-index: calc(var(--z-offset-reverse) + @zindex-table-fixed);
32
+ background: @table-bg;
33
+
34
+ &:after {
35
+ .shared-shadow-style();
36
+ }
37
+
38
+ &-start:after {
39
+ left: 100%;
40
+ }
41
+
42
+ &-end:after {
43
+ right: 100%;
44
+ }
45
+
46
+ &-start-shadow-show:after {
47
+ .shadow-left-style();
48
+ }
49
+
50
+ &-end-shadow-show:after {
51
+ .shadow-right-style();
52
+ }
53
+ }
54
+
55
+ .@{table-prefix-cls}-container {
56
+ position: relative;
57
+
58
+ &:before,
59
+ &:after {
60
+ .shared-shadow-style();
61
+ z-index: calc(var(--columns-count) * 2 + @zindex-table-fixed + 1);
62
+ }
63
+
64
+ &:before {
65
+ left: 0;
66
+ }
67
+
68
+ &:after {
69
+ right: 0;
70
+ }
71
+ }
72
+
73
+ .@{table-prefix-cls}-has-fix-start .@{table-prefix-cls}-container:before {
74
+ display: none;
75
+ }
76
+
77
+ .@{table-prefix-cls}-has-fix-end .@{table-prefix-cls}-container:after {
78
+ display: none;
79
+ }
80
+
81
+ .@{table-prefix-cls}-fix-start-shadow-show .@{table-prefix-cls}-container:before {
82
+ .shadow-left-style();
83
+ }
84
+
85
+ .@{table-prefix-cls}-fix-end-shadow-show .@{table-prefix-cls}-container:after {
86
+ .shadow-right-style();
87
+ }
88
+ }
@@ -0,0 +1,2 @@
1
+ import '../../style/index.less';
2
+ import './index.less';
@@ -0,0 +1,2 @@
1
+ import "../../style/index.less";
2
+ import "./index.less";
@@ -0,0 +1,150 @@
1
+ @import '../../style/themes/index.less';
2
+ @import '~antd/es/style/mixins/index.less';
3
+
4
+ @table-prefix-cls: ~'@{ant-prefix}-table';
5
+
6
+ @table-expand-column-width: 48px;
7
+
8
+ @import './bordered.less';
9
+ @import './virtual.less';
10
+ @import './sticky.less';
11
+ @import './fixed.less';
12
+ @import './selection.less';
13
+
14
+ .@{table-prefix-cls}-wrapper {
15
+ clear: both;
16
+ max-width: 100%;
17
+ --rc-virtual-list-scrollbar-bg: @border-color-split;
18
+ .clearfix();
19
+
20
+ .@{table-prefix-cls} {
21
+ .reset-component();
22
+ font-size: @font-size-base;
23
+ border-radius: @border-radius-base @border-radius-base 0 0;
24
+ scrollbar-color: @table-sticky-scroll-bar-bg @border-color-split;
25
+ }
26
+
27
+ table {
28
+ width: 100%;
29
+ text-align: left;
30
+ border-radius: @border-radius-base @border-radius-base 0 0;
31
+ border-collapse: separate;
32
+ border-spacing: 0;
33
+ }
34
+
35
+ // ============================= Cell ==============================
36
+ .@{table-prefix-cls}-cell,
37
+ .@{table-prefix-cls}-thead > tr > th,
38
+ .@{table-prefix-cls}-tbody > tr > th,
39
+ .@{table-prefix-cls}-tbody > tr > td,
40
+ tfoot > tr > th,
41
+ tfoot > tr > td {
42
+ position: relative;
43
+ padding: @table-padding-vertical @table-padding-horizontal;
44
+ overflow-wrap: break-word;
45
+ }
46
+
47
+ // ============================ Title 表格标题 =============================
48
+ .@{table-prefix-cls}-title {
49
+ padding: @table-padding-vertical @table-padding-horizontal;
50
+ }
51
+
52
+ // ============================ Header 表头 ============================
53
+ .@{table-prefix-cls}-thead {
54
+ > tr > th,
55
+ > tr > td {
56
+ position: relative;
57
+ color: @table-header-color;
58
+ font-weight: 500;
59
+ text-align: start;
60
+ background: @table-header-bg;
61
+ border-bottom: @border-width-base @border-style-base @border-color-base;
62
+ transition: background @motion-duration-mid ease;
63
+
64
+ // 跨列单元格居中对齐
65
+ &[colspan]:not([colspan='1']) {
66
+ text-align: center;
67
+ }
68
+
69
+ &:not(:last-child):not(.@{table-prefix-cls}-selection-column):not(
70
+ .@{table-prefix-cls}-row-expand-icon-cell
71
+ ):not([colspan])::before {
72
+ position: absolute;
73
+ top: 50%;
74
+ right: 0;
75
+ width: 1px;
76
+ height: 1.6em;
77
+ background-color: @border-color-base;
78
+ transform: translateY(-50%);
79
+ transition: background-color @motion-duration-mid;
80
+ content: '';
81
+ }
82
+ }
83
+
84
+ // 跨列表头去除底部边框(非最后一行)
85
+ > tr:not(:last-child) > th[colspan] {
86
+ border-bottom: 0;
87
+ }
88
+ }
89
+
90
+ // ============================ Body 表体 ============================
91
+ .@{table-prefix-cls}-tbody {
92
+ > tr {
93
+ > th,
94
+ > td {
95
+ transition: background @motion-duration-mid, border-color @motion-duration-mid;
96
+ border-bottom: @border-width-base @border-style-base @border-color-base;
97
+
98
+ // ========================= Nest Table 嵌套表格 ===========================
99
+ > .@{table-prefix-cls}-wrapper:only-child,
100
+ > .@{table-prefix-cls}-expanded-row-fixed
101
+ > .@{table-prefix-cls}-wrapper:only-child {
102
+ .@{table-prefix-cls} {
103
+ margin: -@table-padding-vertical -@table-padding-horizontal -@table-padding-vertical
104
+ (@table-expand-column-width - @table-padding-horizontal);
105
+
106
+ .@{table-prefix-cls}-tbody > tr:last-child > td {
107
+ border-bottom-width: 0;
108
+ &:first-child,
109
+ &:last-child {
110
+ border-radius: 0;
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
116
+
117
+ // 表体中的表头单元格样式(特殊场景)
118
+ > th {
119
+ position: relative;
120
+ color: @table-header-color;
121
+ font-weight: 500;
122
+ text-align: left;
123
+ background: @table-header-bg;
124
+ border-bottom: @border-width-base @border-style-base @table-border-color;
125
+ transition: background 0.3s ease;
126
+ }
127
+
128
+ // 测量单元格样式
129
+ & > .@{table-prefix-cls}-measure-cell {
130
+ padding-top: 0 !important;
131
+ padding-bottom: 0 !important;
132
+ border-top: 0 !important;
133
+ border-bottom: 0 !important;
134
+
135
+ .@{table-prefix-cls}-measure-cell-content {
136
+ height: 0;
137
+ overflow: hidden;
138
+ pointer-events: none;
139
+ }
140
+ }
141
+ }
142
+ }
143
+
144
+ // ============================ Footer 表脚 ============================
145
+ .@{table-prefix-cls}-footer {
146
+ padding: @table-padding-vertical @table-padding-horizontal;
147
+ color: @table-footer-color;
148
+ background: @table-footer-bg;
149
+ }
150
+ }
@@ -0,0 +1,90 @@
1
+ @import '../../style/themes/index.less';
2
+ @import '~antd/es/style/mixins/index.less';
3
+
4
+ @table-prefix-cls: ~'@{ant-prefix}-table';
5
+ @table-expand-icon-size: 17px;
6
+
7
+ @{table-prefix-cls}-wrapper {
8
+ @{table-prefix-cls}-selection-col {
9
+ width: @table-selection-column-width;
10
+
11
+ &.@{table-prefix-cls}-selection-col-with-dropdown {
12
+ width: calc(@table-selection-column-width + @table-expand-icon-size + (@padding-md / 4));
13
+ }
14
+ }
15
+
16
+ @{table-prefix-cls}-bordered @{table-prefix-cls}-selection-col {
17
+ width: calc(@table-selection-column-width + (@padding-xs * 2));
18
+
19
+ &.@{table-prefix-cls}-selection-col-with-dropdown {
20
+ width: calc(
21
+ @table-selection-column-width + @table-expand-icon-size + (@padding-md / 4) +
22
+ (@padding-xs * 2)
23
+ );
24
+ }
25
+ }
26
+
27
+ table tr th.@{table-prefix-cls}-selection-column,
28
+ table tr td.@{table-prefix-cls}-selection-column,
29
+ @{table-prefix-cls}-selection-column {
30
+ padding-right: @padding-xs;
31
+ padding-left: @padding-xs;
32
+ text-align: center;
33
+
34
+ .@{ant-prefix}-radio-wrapper {
35
+ margin-right: 0;
36
+ }
37
+ }
38
+
39
+ table tr th.@{table-prefix-cls}-selection-column.@{table-prefix-cls}-cell-fix-left {
40
+ z-index: calc(@zindex-table-fixed + 1);
41
+ }
42
+
43
+ table tr th.@{table-prefix-cls}-selection-column::after {
44
+ background-color: transparent !important;
45
+ }
46
+
47
+ @{table-prefix-cls}-selection {
48
+ position: relative;
49
+ display: inline-flex;
50
+ flex-direction: column;
51
+ }
52
+
53
+ @{table-prefix-cls}-selection-extra {
54
+ position: absolute;
55
+ top: 0;
56
+ z-index: 1;
57
+ cursor: pointer;
58
+ transition: all @motion-duration-slow;
59
+ margin-left: 100%;
60
+ padding-left: calc(@table-padding-horizontal / 4);
61
+
62
+ .@{iconfont-css-prefix} {
63
+ color: @table-header-bg;
64
+ font-size: @table-expand-icon-size;
65
+ vertical-align: baseline;
66
+
67
+ &:hover {
68
+ color: @primary-color;
69
+ }
70
+ }
71
+ }
72
+
73
+ @{table-prefix-cls}-tbody {
74
+ @{table-prefix-cls}-row {
75
+ &.@{table-prefix-cls}-row-selected {
76
+ > @{table-prefix-cls}-cell {
77
+ background: @table-selected-row-bg;
78
+
79
+ &.@{table-prefix-cls}-cell-row-hover {
80
+ background: @table-selected-row-hover-bg;
81
+ }
82
+ }
83
+ }
84
+
85
+ > @{table-prefix-cls}-cell-row-hover {
86
+ background: @table-row-hover-bg;
87
+ }
88
+ }
89
+ }
90
+ }