@dtjoy/dt-design 1.1.0 → 1.1.2
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.
- package/README.md +141 -141
- package/esm/blockHeader/index.js +17 -7
- package/esm/index.js +9 -1
- package/lib/blockHeader/index.js +15 -6
- package/lib/index.js +1 -9
- package/package.json +2 -4
- package/esm/_util/easings.d.ts +0 -1
- package/esm/_util/extendsObject.d.ts +0 -4
- package/esm/_util/gapSize.d.ts +0 -3
- package/esm/_util/getScroll.d.ts +0 -3
- package/esm/_util/hooks/index.d.ts +0 -4
- package/esm/_util/hooks/useForceUpdate.d.ts +0 -2
- package/esm/_util/hooks/useOrientation.d.ts +0 -2
- package/esm/_util/hooks/useProxyImperativeHandle.d.ts +0 -4
- package/esm/_util/hooks/useSyncState.d.ts +0 -3
- package/esm/_util/index.d.ts +0 -3
- package/esm/_util/isNonNullable.d.ts +0 -2
- package/esm/_util/scrollTo.d.ts +0 -10
- package/esm/_util/type.d.ts +0 -52
- package/esm/_util/warning.d.ts +0 -31
- package/esm/blockHeader/index.d.ts +0 -55
- package/esm/blockHeader/style/index.d.ts +0 -2
- package/esm/button/index.d.ts +0 -10
- package/esm/button/style/index.d.ts +0 -2
- package/esm/collapsible/index.d.ts +0 -102
- package/esm/collapsible/style/index.d.ts +0 -1
- package/esm/collapsibleActionItems/index.d.ts +0 -24
- package/esm/collapsibleActionItems/style/index.d.ts +0 -2
- package/esm/flex/index.d.ts +0 -7
- package/esm/flex/interface.d.ts +0 -16
- package/esm/flex/style/index.d.ts +0 -2
- package/esm/flex/utils.d.ts +0 -7
- package/esm/formList/index.d.ts +0 -78
- package/esm/formList/style/index.d.ts +0 -2
- package/esm/index.d.ts +0 -17
- package/esm/overflowList/index.d.ts +0 -40
- package/esm/overflowList/style/index.d.ts +0 -2
- package/esm/resize/index.d.ts +0 -9
- package/esm/resizeObserver/index.d.ts +0 -45
- package/esm/splitter/Panel.d.ts +0 -7
- package/esm/splitter/SplitBar.d.ts +0 -24
- package/esm/splitter/Splitter.d.ts +0 -5
- package/esm/splitter/hooks/sizeUtil.d.ts +0 -3
- package/esm/splitter/hooks/useItems.d.ts +0 -14
- package/esm/splitter/hooks/useResizable.d.ts +0 -10
- package/esm/splitter/hooks/useResize.d.ts +0 -6
- package/esm/splitter/hooks/useSizes.d.ts +0 -4
- package/esm/splitter/index.d.ts +0 -8
- package/esm/splitter/interface.d.ts +0 -69
- package/esm/splitter/style/index.d.ts +0 -2
- package/esm/statusTag/index.d.ts +0 -29
- package/esm/statusTag/style/index.d.ts +0 -2
- package/esm/style/index.d.ts +0 -1
- package/esm/table/InternalTable.d.ts +0 -32
- package/esm/table/InternalTable.js +0 -429
- package/esm/table/RcTable/VirtualTable.d.ts +0 -2
- package/esm/table/RcTable/VirtualTable.js +0 -9
- package/esm/table/RcTable/index.d.ts +0 -2
- package/esm/table/RcTable/index.js +0 -9
- package/esm/table/Table.d.ts +0 -17
- package/esm/table/Table.js +0 -28
- package/esm/table/TableMeasureRowContext.d.ts +0 -3
- package/esm/table/TableMeasureRowContext.js +0 -3
- package/esm/table/hooks/useContainerWidth.d.ts +0 -1
- package/esm/table/hooks/useContainerWidth.js +0 -14
- package/esm/table/index.d.ts +0 -7
- package/esm/table/index.js +0 -2
- package/esm/table/interface.d.ts +0 -196
- package/esm/table/interface.js +0 -4
- package/esm/table/style/bordered.less +0 -141
- package/esm/table/style/fixed.less +0 -88
- package/esm/table/style/index.d.ts +0 -2
- package/esm/table/style/index.js +0 -2
- package/esm/table/style/index.less +0 -150
- package/esm/table/style/selection.less +0 -90
- package/esm/table/style/sticky.less +0 -55
- package/esm/table/style/virtual.less +0 -65
- package/esm/table/util.d.ts +0 -14
- package/esm/table/util.js +0 -33
- package/lib/_util/easings.d.ts +0 -1
- package/lib/_util/extendsObject.d.ts +0 -4
- package/lib/_util/gapSize.d.ts +0 -3
- package/lib/_util/getScroll.d.ts +0 -3
- package/lib/_util/hooks/index.d.ts +0 -4
- package/lib/_util/hooks/useForceUpdate.d.ts +0 -2
- package/lib/_util/hooks/useOrientation.d.ts +0 -2
- package/lib/_util/hooks/useProxyImperativeHandle.d.ts +0 -4
- package/lib/_util/hooks/useSyncState.d.ts +0 -3
- package/lib/_util/index.d.ts +0 -3
- package/lib/_util/isNonNullable.d.ts +0 -2
- package/lib/_util/scrollTo.d.ts +0 -10
- package/lib/_util/type.d.ts +0 -52
- package/lib/_util/warning.d.ts +0 -31
- package/lib/blockHeader/index.d.ts +0 -55
- package/lib/blockHeader/style/index.d.ts +0 -2
- package/lib/button/index.d.ts +0 -10
- package/lib/button/style/index.d.ts +0 -2
- package/lib/collapsible/index.d.ts +0 -102
- package/lib/collapsible/style/index.d.ts +0 -1
- package/lib/collapsibleActionItems/index.d.ts +0 -24
- package/lib/collapsibleActionItems/style/index.d.ts +0 -2
- package/lib/flex/index.d.ts +0 -7
- package/lib/flex/interface.d.ts +0 -16
- package/lib/flex/style/index.d.ts +0 -2
- package/lib/flex/utils.d.ts +0 -7
- package/lib/formList/index.d.ts +0 -78
- package/lib/formList/style/index.d.ts +0 -2
- package/lib/index.d.ts +0 -17
- package/lib/overflowList/index.d.ts +0 -40
- package/lib/overflowList/style/index.d.ts +0 -2
- package/lib/resize/index.d.ts +0 -9
- package/lib/resizeObserver/index.d.ts +0 -45
- package/lib/splitter/Panel.d.ts +0 -7
- package/lib/splitter/SplitBar.d.ts +0 -24
- package/lib/splitter/Splitter.d.ts +0 -5
- package/lib/splitter/hooks/sizeUtil.d.ts +0 -3
- package/lib/splitter/hooks/useItems.d.ts +0 -14
- package/lib/splitter/hooks/useResizable.d.ts +0 -10
- package/lib/splitter/hooks/useResize.d.ts +0 -6
- package/lib/splitter/hooks/useSizes.d.ts +0 -4
- package/lib/splitter/index.d.ts +0 -8
- package/lib/splitter/interface.d.ts +0 -69
- package/lib/splitter/style/index.d.ts +0 -2
- package/lib/statusTag/index.d.ts +0 -29
- package/lib/statusTag/style/index.d.ts +0 -2
- package/lib/style/index.d.ts +0 -1
- package/lib/table/InternalTable.d.ts +0 -32
- package/lib/table/InternalTable.js +0 -395
- package/lib/table/RcTable/VirtualTable.d.ts +0 -2
- package/lib/table/RcTable/VirtualTable.js +0 -17
- package/lib/table/RcTable/index.d.ts +0 -2
- package/lib/table/RcTable/index.js +0 -17
- package/lib/table/Table.d.ts +0 -17
- package/lib/table/Table.js +0 -37
- package/lib/table/TableMeasureRowContext.d.ts +0 -3
- package/lib/table/TableMeasureRowContext.js +0 -10
- package/lib/table/hooks/useContainerWidth.d.ts +0 -1
- package/lib/table/hooks/useContainerWidth.js +0 -20
- package/lib/table/index.d.ts +0 -7
- package/lib/table/index.js +0 -9
- package/lib/table/interface.d.ts +0 -196
- package/lib/table/interface.js +0 -8
- package/lib/table/style/bordered.less +0 -141
- package/lib/table/style/fixed.less +0 -88
- package/lib/table/style/index.d.ts +0 -2
- package/lib/table/style/index.js +0 -4
- package/lib/table/style/index.less +0 -150
- package/lib/table/style/selection.less +0 -90
- package/lib/table/style/sticky.less +0 -55
- package/lib/table/style/virtual.less +0 -65
- package/lib/table/util.d.ts +0 -14
- package/lib/table/util.js +0 -44
package/esm/table/interface.d.ts
DELETED
|
@@ -1,196 +0,0 @@
|
|
|
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
|
-
}
|
package/esm/table/interface.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
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
|
-
}
|
package/esm/table/style/index.js
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
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
|
-
}
|