@dtjoy/dt-design 1.0.5 → 1.0.7

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