@dtjoy/dt-design 1.1.1 → 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/index.js +9 -1
- 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 -58
- 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 -58
- 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
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
@import '../../style/themes/index.less';
|
|
2
|
-
|
|
3
|
-
@table-prefix-cls: ~'@{ant-prefix}-table';
|
|
4
|
-
|
|
5
|
-
@table-scroll-thumb-bg: #c1c1c1;
|
|
6
|
-
@table-scroll-thumb-bg-hover: #a8a8a8;
|
|
7
|
-
@table-scroll-thumb-size: 6px;
|
|
8
|
-
@table-scroll-bg: #fafafa;
|
|
9
|
-
@sticky-scroll-bar-border-radius: @border-radius-base;
|
|
10
|
-
@opacity-loading: 0.6;
|
|
11
|
-
|
|
12
|
-
@motion-duration-slow: 0.3s;
|
|
13
|
-
|
|
14
|
-
.@{table-prefix-cls}-wrapper {
|
|
15
|
-
.@{table-prefix-cls}-sticky {
|
|
16
|
-
&-holder {
|
|
17
|
-
position: sticky;
|
|
18
|
-
|
|
19
|
-
z-index: calc(var(--columns-count) * 2 + @zindex-table-fixed + 1);
|
|
20
|
-
background: @background-color-base;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&-scroll {
|
|
24
|
-
position: sticky;
|
|
25
|
-
bottom: 0;
|
|
26
|
-
|
|
27
|
-
height: @table-scroll-thumb-size !important;
|
|
28
|
-
z-index: calc(var(--columns-count) * 2 + @zindex-table-fixed + 1);
|
|
29
|
-
display: flex;
|
|
30
|
-
align-items: center;
|
|
31
|
-
background: @table-scroll-bg;
|
|
32
|
-
border-top: @border-width-base @border-style-base @border-color-base;
|
|
33
|
-
opacity: @opacity-loading;
|
|
34
|
-
|
|
35
|
-
&:hover {
|
|
36
|
-
transform-origin: center bottom;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&-bar {
|
|
40
|
-
height: @table-scroll-thumb-size;
|
|
41
|
-
background-color: @table-scroll-thumb-bg;
|
|
42
|
-
border-radius: @sticky-scroll-bar-border-radius;
|
|
43
|
-
|
|
44
|
-
transition: all @motion-duration-slow, transform 0s;
|
|
45
|
-
position: absolute;
|
|
46
|
-
bottom: 0;
|
|
47
|
-
|
|
48
|
-
&:hover,
|
|
49
|
-
&-active {
|
|
50
|
-
background-color: @table-scroll-thumb-bg-hover;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1,65 +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}-tbody-virtual {
|
|
7
|
-
.@{table-prefix-cls}-tbody-virtual-holder-inner {
|
|
8
|
-
& > .@{table-prefix-cls}-row,
|
|
9
|
-
& > div:not(.@{table-prefix-cls}-row) > .@{table-prefix-cls}-row {
|
|
10
|
-
display: flex;
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
width: 100%;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.@{table-prefix-cls}-cell {
|
|
17
|
-
border-bottom: @border-width-base @border-style-base @border-color-base;
|
|
18
|
-
transition: background 0.2s;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.@{table-prefix-cls}-expanded-row {
|
|
22
|
-
.@{table-prefix-cls}-expanded-row-cell.@{table-prefix-cls}-expanded-row-cell-fixed {
|
|
23
|
-
position: sticky;
|
|
24
|
-
left: 0;
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
|
|
27
|
-
width: calc(var(--virtual-width) - @border-width-base);
|
|
28
|
-
border-right: none;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.@{table-prefix-cls}-bordered {
|
|
34
|
-
.@{table-prefix-cls}-tbody-virtual {
|
|
35
|
-
&:after {
|
|
36
|
-
content: '';
|
|
37
|
-
left: 0;
|
|
38
|
-
right: 0;
|
|
39
|
-
bottom: 0;
|
|
40
|
-
border-bottom: @border-width-base @border-style-base @border-color-base;
|
|
41
|
-
position: absolute;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.@{table-prefix-cls}-cell {
|
|
45
|
-
border-right: @border-width-base @border-style-base @border-color-base;
|
|
46
|
-
|
|
47
|
-
&.@{table-prefix-cls}-cell-fix-right-first:before {
|
|
48
|
-
content: '';
|
|
49
|
-
position: absolute;
|
|
50
|
-
top: 0;
|
|
51
|
-
bottom: 0;
|
|
52
|
-
left: calc(-@border-width-base);
|
|
53
|
-
border-left: @border-width-base @border-style-base @border-color-base;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&.@{table-prefix-cls}-virtual {
|
|
59
|
-
.@{table-prefix-cls}-placeholder .@{table-prefix-cls}-cell {
|
|
60
|
-
border-right: @border-width-base @border-style-base @border-color-base;
|
|
61
|
-
border-bottom: @border-width-base @border-style-base @border-color-base;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
package/lib/table/util.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { AnyObject } from '../_util/type';
|
|
3
|
-
import type { ColumnTitle, ColumnTitleProps, ColumnType, Key } from './interface';
|
|
4
|
-
export declare const getColumnKey: <RecordType extends AnyObject = AnyObject>(column: ColumnType<RecordType>, defaultKey: string) => Key;
|
|
5
|
-
export declare function getColumnPos(index: number, pos?: string): string;
|
|
6
|
-
export declare const renderColumnTitle: <RecordType extends AnyObject = AnyObject>(title: ColumnTitle<RecordType>, props: ColumnTitleProps<RecordType>) => import("react").ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
* Safe get column title
|
|
9
|
-
*
|
|
10
|
-
* Should filter [object Object]
|
|
11
|
-
*
|
|
12
|
-
* @param title
|
|
13
|
-
*/
|
|
14
|
-
export declare const safeColumnTitle: <RecordType extends AnyObject = AnyObject>(title: ColumnTitle<RecordType>, props: ColumnTitleProps<RecordType>) => import("react").ReactNode;
|
package/lib/table/util.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getColumnKey = void 0;
|
|
7
|
-
exports.getColumnPos = getColumnPos;
|
|
8
|
-
exports.safeColumnTitle = exports.renderColumnTitle = void 0;
|
|
9
|
-
const getColumnKey = (column, defaultKey) => {
|
|
10
|
-
if ('key' in column && column.key !== undefined && column.key !== null) {
|
|
11
|
-
return column.key;
|
|
12
|
-
}
|
|
13
|
-
if (column.dataIndex) {
|
|
14
|
-
return Array.isArray(column.dataIndex) ? column.dataIndex.join('.') : column.dataIndex;
|
|
15
|
-
}
|
|
16
|
-
return defaultKey;
|
|
17
|
-
};
|
|
18
|
-
exports.getColumnKey = getColumnKey;
|
|
19
|
-
function getColumnPos(index, pos) {
|
|
20
|
-
return pos ? `${pos}-${index}` : `${index}`;
|
|
21
|
-
}
|
|
22
|
-
const renderColumnTitle = (title, props) => {
|
|
23
|
-
if (typeof title === 'function') {
|
|
24
|
-
return title(props);
|
|
25
|
-
}
|
|
26
|
-
return title;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Safe get column title
|
|
31
|
-
*
|
|
32
|
-
* Should filter [object Object]
|
|
33
|
-
*
|
|
34
|
-
* @param title
|
|
35
|
-
*/
|
|
36
|
-
exports.renderColumnTitle = renderColumnTitle;
|
|
37
|
-
const safeColumnTitle = (title, props) => {
|
|
38
|
-
const res = renderColumnTitle(title, props);
|
|
39
|
-
if (Object.prototype.toString.call(res) === '[object Object]') {
|
|
40
|
-
return '';
|
|
41
|
-
}
|
|
42
|
-
return res;
|
|
43
|
-
};
|
|
44
|
-
exports.safeColumnTitle = safeColumnTitle;
|