@dtjoy/dt-design 1.0.6 → 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 (188) 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 +5 -5
  10. package/esm/blockHeader/index.js +13 -15
  11. package/esm/blockHeader/style/index.less +143 -143
  12. package/esm/button/index.js +2 -2
  13. package/esm/collapsible/index.js +53 -55
  14. package/esm/collapsibleActionItems/index.js +2 -2
  15. package/esm/flex/index.js +1 -1
  16. package/esm/flex/style/index.less +76 -76
  17. package/esm/flex/utils.js +1 -1
  18. package/esm/formList/index.js +13 -11
  19. package/esm/formList/style/index.less +45 -45
  20. package/esm/index.js +3 -1
  21. package/esm/overflowList/index.js +4 -3
  22. package/esm/resize/index.js +1 -1
  23. package/esm/resizeObserver/index.js +3 -2
  24. package/esm/splitter/Panel.js +3 -3
  25. package/esm/splitter/SplitBar.js +8 -7
  26. package/esm/splitter/Splitter.js +5 -4
  27. package/esm/splitter/hooks/useItems.js +2 -2
  28. package/esm/splitter/hooks/useResize.js +5 -5
  29. package/esm/statusTag/index.js +8 -8
  30. package/esm/style/index.less +1 -1
  31. package/esm/style/themes/index.less +2 -2
  32. package/esm/style/themes/variable.less +4 -0
  33. package/esm/table/InternalTable.js +429 -0
  34. package/esm/table/RcTable/VirtualTable.js +9 -0
  35. package/esm/table/RcTable/index.js +9 -0
  36. package/esm/table/Table.js +28 -0
  37. package/esm/table/TableMeasureRowContext.js +3 -0
  38. package/esm/table/hooks/useContainerWidth.js +14 -0
  39. package/esm/table/index.js +2 -0
  40. package/esm/table/interface.js +4 -0
  41. package/esm/table/style/bordered.less +141 -0
  42. package/esm/table/style/fixed.less +88 -0
  43. package/esm/table/style/index.js +2 -0
  44. package/esm/table/style/index.less +150 -0
  45. package/esm/table/style/selection.less +90 -0
  46. package/esm/table/style/sticky.less +55 -0
  47. package/esm/table/style/virtual.less +65 -0
  48. package/esm/table/util.js +33 -0
  49. package/lib/_util/easings.js +15 -0
  50. package/lib/_util/extendsObject.js +20 -0
  51. package/lib/_util/getScroll.js +39 -0
  52. package/lib/_util/hooks/index.js +33 -0
  53. package/lib/_util/hooks/useForceUpdate.js +12 -0
  54. package/lib/_util/hooks/useProxyImperativeHandle.js +40 -0
  55. package/lib/_util/hooks/useSyncState.js +19 -0
  56. package/lib/_util/scrollTo.js +44 -0
  57. package/lib/_util/warning.js +7 -8
  58. package/lib/blockHeader/index.js +13 -12
  59. package/lib/blockHeader/style/index.less +143 -143
  60. package/lib/button/index.js +2 -2
  61. package/lib/collapsible/index.js +49 -49
  62. package/lib/collapsibleActionItems/index.js +2 -2
  63. package/lib/flex/index.js +2 -2
  64. package/lib/flex/style/index.less +76 -76
  65. package/lib/flex/utils.js +2 -2
  66. package/lib/formList/index.js +10 -10
  67. package/lib/formList/style/index.less +45 -45
  68. package/lib/index.js +21 -2
  69. package/lib/overflowList/index.js +4 -3
  70. package/lib/resize/index.js +1 -1
  71. package/lib/resizeObserver/index.js +3 -2
  72. package/lib/splitter/Panel.js +3 -3
  73. package/lib/splitter/SplitBar.js +8 -7
  74. package/lib/splitter/Splitter.js +5 -4
  75. package/lib/splitter/hooks/useItems.js +2 -2
  76. package/lib/splitter/hooks/useResize.js +5 -5
  77. package/lib/statusTag/index.js +8 -8
  78. package/lib/style/index.less +1 -1
  79. package/lib/style/themes/index.less +2 -2
  80. package/lib/style/themes/variable.less +4 -0
  81. package/lib/table/InternalTable.js +395 -0
  82. package/lib/table/RcTable/VirtualTable.js +17 -0
  83. package/lib/table/RcTable/index.js +17 -0
  84. package/lib/table/Table.js +37 -0
  85. package/lib/{_util/zindexContext.js → table/TableMeasureRowContext.js} +2 -5
  86. package/lib/table/hooks/useContainerWidth.js +20 -0
  87. package/lib/table/index.js +9 -0
  88. package/lib/table/interface.js +8 -0
  89. package/lib/table/style/bordered.less +141 -0
  90. package/lib/table/style/fixed.less +88 -0
  91. package/lib/table/style/index.js +4 -0
  92. package/lib/table/style/index.less +150 -0
  93. package/lib/table/style/selection.less +90 -0
  94. package/lib/table/style/sticky.less +55 -0
  95. package/lib/table/style/virtual.less +65 -0
  96. package/lib/table/util.js +44 -0
  97. package/package.json +82 -66
  98. package/esm/_util/convertToTooltipProps.d.ts +0 -4
  99. package/esm/_util/convertToTooltipProps.js +0 -15
  100. package/esm/_util/gapSize.d.ts +0 -3
  101. package/esm/_util/hooks/index.d.ts +0 -1
  102. package/esm/_util/hooks/useOrientation.d.ts +0 -2
  103. package/esm/_util/hooks/useZIndex.d.ts +0 -8
  104. package/esm/_util/hooks/useZIndex.js +0 -51
  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/_util/warning.d.ts +0 -31
  109. package/esm/_util/zindexContext.d.ts +0 -3
  110. package/esm/_util/zindexContext.js +0 -6
  111. package/esm/blockHeader/index.d.ts +0 -48
  112. package/esm/blockHeader/style/index.d.ts +0 -2
  113. package/esm/button/index.d.ts +0 -10
  114. package/esm/button/style/index.d.ts +0 -2
  115. package/esm/collapsible/index.d.ts +0 -97
  116. package/esm/collapsible/style/index.d.ts +0 -1
  117. package/esm/collapsibleActionItems/index.d.ts +0 -24
  118. package/esm/collapsibleActionItems/style/index.d.ts +0 -2
  119. package/esm/flex/index.d.ts +0 -7
  120. package/esm/flex/interface.d.ts +0 -16
  121. package/esm/flex/style/index.d.ts +0 -2
  122. package/esm/flex/utils.d.ts +0 -7
  123. package/esm/formList/index.d.ts +0 -77
  124. package/esm/formList/style/index.d.ts +0 -2
  125. package/esm/index.d.ts +0 -14
  126. package/esm/overflowList/index.d.ts +0 -39
  127. package/esm/overflowList/style/index.d.ts +0 -2
  128. package/esm/resize/index.d.ts +0 -8
  129. package/esm/resizeObserver/index.d.ts +0 -45
  130. package/esm/splitter/Panel.d.ts +0 -7
  131. package/esm/splitter/SplitBar.d.ts +0 -24
  132. package/esm/splitter/Splitter.d.ts +0 -5
  133. package/esm/splitter/hooks/sizeUtil.d.ts +0 -3
  134. package/esm/splitter/hooks/useItems.d.ts +0 -14
  135. package/esm/splitter/hooks/useResizable.d.ts +0 -10
  136. package/esm/splitter/hooks/useResize.d.ts +0 -6
  137. package/esm/splitter/hooks/useSizes.d.ts +0 -4
  138. package/esm/splitter/index.d.ts +0 -8
  139. package/esm/splitter/interface.d.ts +0 -69
  140. package/esm/splitter/style/index.d.ts +0 -2
  141. package/esm/statusTag/index.d.ts +0 -28
  142. package/esm/statusTag/style/index.d.ts +0 -2
  143. package/esm/style/index.d.ts +0 -1
  144. package/lib/_util/convertToTooltipProps.d.ts +0 -4
  145. package/lib/_util/convertToTooltipProps.js +0 -21
  146. package/lib/_util/gapSize.d.ts +0 -3
  147. package/lib/_util/hooks/index.d.ts +0 -1
  148. package/lib/_util/hooks/useOrientation.d.ts +0 -2
  149. package/lib/_util/hooks/useZIndex.d.ts +0 -8
  150. package/lib/_util/hooks/useZIndex.js +0 -59
  151. package/lib/_util/index.d.ts +0 -3
  152. package/lib/_util/isNonNullable.d.ts +0 -2
  153. package/lib/_util/type.d.ts +0 -52
  154. package/lib/_util/warning.d.ts +0 -31
  155. package/lib/_util/zindexContext.d.ts +0 -3
  156. package/lib/blockHeader/index.d.ts +0 -48
  157. package/lib/blockHeader/style/index.d.ts +0 -2
  158. package/lib/button/index.d.ts +0 -10
  159. package/lib/button/style/index.d.ts +0 -2
  160. package/lib/collapsible/index.d.ts +0 -97
  161. package/lib/collapsible/style/index.d.ts +0 -1
  162. package/lib/collapsibleActionItems/index.d.ts +0 -24
  163. package/lib/collapsibleActionItems/style/index.d.ts +0 -2
  164. package/lib/flex/index.d.ts +0 -7
  165. package/lib/flex/interface.d.ts +0 -16
  166. package/lib/flex/style/index.d.ts +0 -2
  167. package/lib/flex/utils.d.ts +0 -7
  168. package/lib/formList/index.d.ts +0 -77
  169. package/lib/formList/style/index.d.ts +0 -2
  170. package/lib/index.d.ts +0 -14
  171. package/lib/overflowList/index.d.ts +0 -39
  172. package/lib/overflowList/style/index.d.ts +0 -2
  173. package/lib/resize/index.d.ts +0 -8
  174. package/lib/resizeObserver/index.d.ts +0 -45
  175. package/lib/splitter/Panel.d.ts +0 -7
  176. package/lib/splitter/SplitBar.d.ts +0 -24
  177. package/lib/splitter/Splitter.d.ts +0 -5
  178. package/lib/splitter/hooks/sizeUtil.d.ts +0 -3
  179. package/lib/splitter/hooks/useItems.d.ts +0 -14
  180. package/lib/splitter/hooks/useResizable.d.ts +0 -10
  181. package/lib/splitter/hooks/useResize.d.ts +0 -6
  182. package/lib/splitter/hooks/useSizes.d.ts +0 -4
  183. package/lib/splitter/index.d.ts +0 -8
  184. package/lib/splitter/interface.d.ts +0 -69
  185. package/lib/splitter/style/index.d.ts +0 -2
  186. package/lib/statusTag/index.d.ts +0 -28
  187. package/lib/statusTag/style/index.d.ts +0 -2
  188. package/lib/style/index.d.ts +0 -1
@@ -0,0 +1,141 @@
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
+ }
@@ -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,2 @@
1
+ import "../../style/index.less";
2
+ import "./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,33 @@
1
+ export var getColumnKey = function getColumnKey(column, defaultKey) {
2
+ if ('key' in column && column.key !== undefined && column.key !== null) {
3
+ return column.key;
4
+ }
5
+ if (column.dataIndex) {
6
+ return Array.isArray(column.dataIndex) ? column.dataIndex.join('.') : column.dataIndex;
7
+ }
8
+ return defaultKey;
9
+ };
10
+ export function getColumnPos(index, pos) {
11
+ return pos ? "".concat(pos, "-").concat(index) : "".concat(index);
12
+ }
13
+ export var renderColumnTitle = function renderColumnTitle(title, props) {
14
+ if (typeof title === 'function') {
15
+ return title(props);
16
+ }
17
+ return title;
18
+ };
19
+
20
+ /**
21
+ * Safe get column title
22
+ *
23
+ * Should filter [object Object]
24
+ *
25
+ * @param title
26
+ */
27
+ export var safeColumnTitle = function safeColumnTitle(title, props) {
28
+ var res = renderColumnTitle(title, props);
29
+ if (Object.prototype.toString.call(res) === '[object Object]') {
30
+ return '';
31
+ }
32
+ return res;
33
+ };
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.easeInOutCubic = easeInOutCubic;
7
+ function easeInOutCubic(t, b, c, d) {
8
+ const cc = c - b;
9
+ t /= d / 2;
10
+ if (t < 1) {
11
+ return cc / 2 * t * t * t + b;
12
+ }
13
+ // biome-ignore lint: it is a common easing function
14
+ return cc / 2 * ((t -= 2) * t * t + 2) + b;
15
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ function mergeProps(...items) {
8
+ const ret = {};
9
+ items.forEach(item => {
10
+ if (item) {
11
+ Object.keys(item).forEach(key => {
12
+ if (item[key] !== undefined) {
13
+ ret[key] = item[key];
14
+ }
15
+ });
16
+ }
17
+ });
18
+ return ret;
19
+ }
20
+ var _default = exports.default = mergeProps;