@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.
Files changed (152) hide show
  1. package/README.md +141 -141
  2. package/esm/blockHeader/index.js +17 -7
  3. package/esm/index.js +9 -1
  4. package/lib/blockHeader/index.js +15 -6
  5. package/lib/index.js +1 -9
  6. package/package.json +2 -4
  7. package/esm/_util/easings.d.ts +0 -1
  8. package/esm/_util/extendsObject.d.ts +0 -4
  9. package/esm/_util/gapSize.d.ts +0 -3
  10. package/esm/_util/getScroll.d.ts +0 -3
  11. package/esm/_util/hooks/index.d.ts +0 -4
  12. package/esm/_util/hooks/useForceUpdate.d.ts +0 -2
  13. package/esm/_util/hooks/useOrientation.d.ts +0 -2
  14. package/esm/_util/hooks/useProxyImperativeHandle.d.ts +0 -4
  15. package/esm/_util/hooks/useSyncState.d.ts +0 -3
  16. package/esm/_util/index.d.ts +0 -3
  17. package/esm/_util/isNonNullable.d.ts +0 -2
  18. package/esm/_util/scrollTo.d.ts +0 -10
  19. package/esm/_util/type.d.ts +0 -52
  20. package/esm/_util/warning.d.ts +0 -31
  21. package/esm/blockHeader/index.d.ts +0 -55
  22. package/esm/blockHeader/style/index.d.ts +0 -2
  23. package/esm/button/index.d.ts +0 -10
  24. package/esm/button/style/index.d.ts +0 -2
  25. package/esm/collapsible/index.d.ts +0 -102
  26. package/esm/collapsible/style/index.d.ts +0 -1
  27. package/esm/collapsibleActionItems/index.d.ts +0 -24
  28. package/esm/collapsibleActionItems/style/index.d.ts +0 -2
  29. package/esm/flex/index.d.ts +0 -7
  30. package/esm/flex/interface.d.ts +0 -16
  31. package/esm/flex/style/index.d.ts +0 -2
  32. package/esm/flex/utils.d.ts +0 -7
  33. package/esm/formList/index.d.ts +0 -78
  34. package/esm/formList/style/index.d.ts +0 -2
  35. package/esm/index.d.ts +0 -17
  36. package/esm/overflowList/index.d.ts +0 -40
  37. package/esm/overflowList/style/index.d.ts +0 -2
  38. package/esm/resize/index.d.ts +0 -9
  39. package/esm/resizeObserver/index.d.ts +0 -45
  40. package/esm/splitter/Panel.d.ts +0 -7
  41. package/esm/splitter/SplitBar.d.ts +0 -24
  42. package/esm/splitter/Splitter.d.ts +0 -5
  43. package/esm/splitter/hooks/sizeUtil.d.ts +0 -3
  44. package/esm/splitter/hooks/useItems.d.ts +0 -14
  45. package/esm/splitter/hooks/useResizable.d.ts +0 -10
  46. package/esm/splitter/hooks/useResize.d.ts +0 -6
  47. package/esm/splitter/hooks/useSizes.d.ts +0 -4
  48. package/esm/splitter/index.d.ts +0 -8
  49. package/esm/splitter/interface.d.ts +0 -69
  50. package/esm/splitter/style/index.d.ts +0 -2
  51. package/esm/statusTag/index.d.ts +0 -29
  52. package/esm/statusTag/style/index.d.ts +0 -2
  53. package/esm/style/index.d.ts +0 -1
  54. package/esm/table/InternalTable.d.ts +0 -32
  55. package/esm/table/InternalTable.js +0 -429
  56. package/esm/table/RcTable/VirtualTable.d.ts +0 -2
  57. package/esm/table/RcTable/VirtualTable.js +0 -9
  58. package/esm/table/RcTable/index.d.ts +0 -2
  59. package/esm/table/RcTable/index.js +0 -9
  60. package/esm/table/Table.d.ts +0 -17
  61. package/esm/table/Table.js +0 -28
  62. package/esm/table/TableMeasureRowContext.d.ts +0 -3
  63. package/esm/table/TableMeasureRowContext.js +0 -3
  64. package/esm/table/hooks/useContainerWidth.d.ts +0 -1
  65. package/esm/table/hooks/useContainerWidth.js +0 -14
  66. package/esm/table/index.d.ts +0 -7
  67. package/esm/table/index.js +0 -2
  68. package/esm/table/interface.d.ts +0 -196
  69. package/esm/table/interface.js +0 -4
  70. package/esm/table/style/bordered.less +0 -141
  71. package/esm/table/style/fixed.less +0 -88
  72. package/esm/table/style/index.d.ts +0 -2
  73. package/esm/table/style/index.js +0 -2
  74. package/esm/table/style/index.less +0 -150
  75. package/esm/table/style/selection.less +0 -90
  76. package/esm/table/style/sticky.less +0 -55
  77. package/esm/table/style/virtual.less +0 -65
  78. package/esm/table/util.d.ts +0 -14
  79. package/esm/table/util.js +0 -33
  80. package/lib/_util/easings.d.ts +0 -1
  81. package/lib/_util/extendsObject.d.ts +0 -4
  82. package/lib/_util/gapSize.d.ts +0 -3
  83. package/lib/_util/getScroll.d.ts +0 -3
  84. package/lib/_util/hooks/index.d.ts +0 -4
  85. package/lib/_util/hooks/useForceUpdate.d.ts +0 -2
  86. package/lib/_util/hooks/useOrientation.d.ts +0 -2
  87. package/lib/_util/hooks/useProxyImperativeHandle.d.ts +0 -4
  88. package/lib/_util/hooks/useSyncState.d.ts +0 -3
  89. package/lib/_util/index.d.ts +0 -3
  90. package/lib/_util/isNonNullable.d.ts +0 -2
  91. package/lib/_util/scrollTo.d.ts +0 -10
  92. package/lib/_util/type.d.ts +0 -52
  93. package/lib/_util/warning.d.ts +0 -31
  94. package/lib/blockHeader/index.d.ts +0 -55
  95. package/lib/blockHeader/style/index.d.ts +0 -2
  96. package/lib/button/index.d.ts +0 -10
  97. package/lib/button/style/index.d.ts +0 -2
  98. package/lib/collapsible/index.d.ts +0 -102
  99. package/lib/collapsible/style/index.d.ts +0 -1
  100. package/lib/collapsibleActionItems/index.d.ts +0 -24
  101. package/lib/collapsibleActionItems/style/index.d.ts +0 -2
  102. package/lib/flex/index.d.ts +0 -7
  103. package/lib/flex/interface.d.ts +0 -16
  104. package/lib/flex/style/index.d.ts +0 -2
  105. package/lib/flex/utils.d.ts +0 -7
  106. package/lib/formList/index.d.ts +0 -78
  107. package/lib/formList/style/index.d.ts +0 -2
  108. package/lib/index.d.ts +0 -17
  109. package/lib/overflowList/index.d.ts +0 -40
  110. package/lib/overflowList/style/index.d.ts +0 -2
  111. package/lib/resize/index.d.ts +0 -9
  112. package/lib/resizeObserver/index.d.ts +0 -45
  113. package/lib/splitter/Panel.d.ts +0 -7
  114. package/lib/splitter/SplitBar.d.ts +0 -24
  115. package/lib/splitter/Splitter.d.ts +0 -5
  116. package/lib/splitter/hooks/sizeUtil.d.ts +0 -3
  117. package/lib/splitter/hooks/useItems.d.ts +0 -14
  118. package/lib/splitter/hooks/useResizable.d.ts +0 -10
  119. package/lib/splitter/hooks/useResize.d.ts +0 -6
  120. package/lib/splitter/hooks/useSizes.d.ts +0 -4
  121. package/lib/splitter/index.d.ts +0 -8
  122. package/lib/splitter/interface.d.ts +0 -69
  123. package/lib/splitter/style/index.d.ts +0 -2
  124. package/lib/statusTag/index.d.ts +0 -29
  125. package/lib/statusTag/style/index.d.ts +0 -2
  126. package/lib/style/index.d.ts +0 -1
  127. package/lib/table/InternalTable.d.ts +0 -32
  128. package/lib/table/InternalTable.js +0 -395
  129. package/lib/table/RcTable/VirtualTable.d.ts +0 -2
  130. package/lib/table/RcTable/VirtualTable.js +0 -17
  131. package/lib/table/RcTable/index.d.ts +0 -2
  132. package/lib/table/RcTable/index.js +0 -17
  133. package/lib/table/Table.d.ts +0 -17
  134. package/lib/table/Table.js +0 -37
  135. package/lib/table/TableMeasureRowContext.d.ts +0 -3
  136. package/lib/table/TableMeasureRowContext.js +0 -10
  137. package/lib/table/hooks/useContainerWidth.d.ts +0 -1
  138. package/lib/table/hooks/useContainerWidth.js +0 -20
  139. package/lib/table/index.d.ts +0 -7
  140. package/lib/table/index.js +0 -9
  141. package/lib/table/interface.d.ts +0 -196
  142. package/lib/table/interface.js +0 -8
  143. package/lib/table/style/bordered.less +0 -141
  144. package/lib/table/style/fixed.less +0 -88
  145. package/lib/table/style/index.d.ts +0 -2
  146. package/lib/table/style/index.js +0 -4
  147. package/lib/table/style/index.less +0 -150
  148. package/lib/table/style/selection.less +0 -90
  149. package/lib/table/style/sticky.less +0 -55
  150. package/lib/table/style/virtual.less +0 -65
  151. package/lib/table/util.d.ts +0 -14
  152. 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
- }
@@ -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;