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