@douyinfe/semi-foundation 2.96.1 → 2.98.0
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/cascader/foundation.ts +74 -19
- package/codeHighlight/codeHighlight.scss +1 -1
- package/datePicker/datePicker.scss +100 -5
- package/datePicker/foundation.ts +7 -0
- package/datePicker/inputFoundation.ts +5 -0
- package/form/foundation.ts +55 -7
- package/form/utils.ts +7 -2
- package/image/previewImageFoundation.ts +34 -3
- package/image/previewInnerFoundation.ts +15 -4
- package/input/textarea.scss +35 -0
- package/inputNumber/foundation.ts +119 -3
- package/jsonViewer/jsonViewer.scss +2 -2
- package/lib/cjs/aiChatInput/aiChatInput.css +7 -7
- package/lib/cjs/anchor/anchor.css +3 -3
- package/lib/cjs/autoComplete/autoComplete.css +1 -1
- package/lib/cjs/avatar/avatar.css +5 -5
- package/lib/cjs/badge/badge.css +1 -1
- package/lib/cjs/breadcrumb/breadcrumb.css +2 -2
- package/lib/cjs/calendar/calendar.css +9 -9
- package/lib/cjs/cascader/cascader.css +6 -6
- package/lib/cjs/cascader/foundation.d.ts +12 -0
- package/lib/cjs/cascader/foundation.js +68 -23
- package/lib/cjs/checkbox/checkbox.css +2 -2
- package/lib/cjs/codeHighlight/codeHighlight.css +1 -1
- package/lib/cjs/codeHighlight/codeHighlight.scss +1 -1
- package/lib/cjs/collapse/collapse.css +2 -2
- package/lib/cjs/datePicker/datePicker.css +75 -13
- package/lib/cjs/datePicker/datePicker.scss +100 -5
- package/lib/cjs/datePicker/foundation.d.ts +5 -0
- package/lib/cjs/datePicker/foundation.js +2 -0
- package/lib/cjs/datePicker/inputFoundation.d.ts +5 -0
- package/lib/cjs/descriptions/descriptions.css +6 -6
- package/lib/cjs/dropdown/dropdown.css +2 -2
- package/lib/cjs/form/form.css +4 -4
- package/lib/cjs/form/foundation.d.ts +1 -1
- package/lib/cjs/form/foundation.js +55 -9
- package/lib/cjs/form/utils.js +5 -2
- package/lib/cjs/hotKeys/hotKeys.css +2 -2
- package/lib/cjs/image/image.css +2 -2
- package/lib/cjs/image/previewImageFoundation.d.ts +4 -0
- package/lib/cjs/image/previewImageFoundation.js +33 -2
- package/lib/cjs/image/previewInnerFoundation.d.ts +1 -0
- package/lib/cjs/image/previewInnerFoundation.js +17 -4
- package/lib/cjs/input/input.css +8 -8
- package/lib/cjs/input/textarea.css +19 -2
- package/lib/cjs/input/textarea.scss +35 -0
- package/lib/cjs/inputNumber/foundation.d.ts +15 -0
- package/lib/cjs/inputNumber/foundation.js +113 -3
- package/lib/cjs/jsonViewer/jsonViewer.css +2 -2
- package/lib/cjs/jsonViewer/jsonViewer.scss +2 -2
- package/lib/cjs/list/list.css +1 -1
- package/lib/cjs/modal/modal.css +1 -1
- package/lib/cjs/navigation/navigation.css +4 -3
- package/lib/cjs/navigation/navigation.scss +1 -0
- package/lib/cjs/navigation/variables.scss +1 -1
- package/lib/cjs/notification/notification.css +4 -4
- package/lib/cjs/overflowList/foundation.d.ts +1 -0
- package/lib/cjs/overflowList/foundation.js +51 -1
- package/lib/cjs/pagination/pagination.css +5 -5
- package/lib/cjs/popconfirm/popconfirm.css +1 -1
- package/lib/cjs/popover/popover.css +1 -1
- package/lib/cjs/radio/radio.css +2 -2
- package/lib/cjs/scrollList/itemFoundation.js +12 -0
- package/lib/cjs/scrollList/scrollList.css +2 -2
- package/lib/cjs/select/foundation.d.ts +1 -1
- package/lib/cjs/select/foundation.js +28 -2
- package/lib/cjs/select/select.css +6 -6
- package/lib/cjs/sideSheet/sideSheet.css +2 -2
- package/lib/cjs/sidebar/sidebar.css +11 -11
- package/lib/cjs/slider/foundation.js +46 -12
- package/lib/cjs/slider/rtl.scss +62 -0
- package/lib/cjs/slider/slider.css +45 -0
- package/lib/cjs/slider/slider.scss +2 -0
- package/lib/cjs/steps/steps.css +11 -11
- package/lib/cjs/switch/switch.css +1 -0
- package/lib/cjs/switch/switch.scss +1 -0
- package/lib/cjs/switch/variables.scss +2 -1
- package/lib/cjs/table/foundation.d.ts +36 -0
- package/lib/cjs/table/foundation.js +164 -29
- package/lib/cjs/table/table.css +10 -2
- package/lib/cjs/table/table.scss +17 -0
- package/lib/cjs/tabs/tabs.css +2 -2
- package/lib/cjs/tag/tag.css +28 -2
- package/lib/cjs/tag/tag.scss +33 -0
- package/lib/cjs/tagInput/tagInput.css +19 -2
- package/lib/cjs/tagInput/tagInput.scss +18 -0
- package/lib/cjs/timePicker/constants.d.ts +1 -0
- package/lib/cjs/timePicker/foundation.d.ts +7 -1
- package/lib/cjs/timePicker/foundation.js +62 -11
- package/lib/cjs/timePicker/timePicker.css +1 -1
- package/lib/cjs/timeline/timeline.css +2 -2
- package/lib/cjs/toast/toast.css +1 -1
- package/lib/cjs/tooltip/foundation.js +8 -5
- package/lib/cjs/tooltip/tooltip.css +1 -1
- package/lib/cjs/transfer/constants.d.ts +3 -1
- package/lib/cjs/transfer/constants.js +3 -1
- package/lib/cjs/transfer/foundation.d.ts +3 -0
- package/lib/cjs/transfer/foundation.js +4 -0
- package/lib/cjs/transfer/transfer.css +14 -5
- package/lib/cjs/transfer/transfer.scss +10 -0
- package/lib/cjs/tree/foundation.d.ts +3 -0
- package/lib/cjs/tree/foundation.js +31 -4
- package/lib/cjs/tree/tree.css +1 -1
- package/lib/cjs/treeSelect/foundation.d.ts +1 -0
- package/lib/cjs/treeSelect/foundation.js +8 -1
- package/lib/cjs/treeSelect/treeSelect.css +36 -4
- package/lib/cjs/treeSelect/treeSelect.scss +49 -1
- package/lib/cjs/typography/typography.css +8 -8
- package/lib/cjs/upload/upload.css +8 -8
- package/lib/cjs/utils/Store.d.ts +1 -1
- package/lib/cjs/utils/Store.js +1 -0
- package/lib/es/aiChatInput/aiChatInput.css +7 -7
- package/lib/es/anchor/anchor.css +3 -3
- package/lib/es/autoComplete/autoComplete.css +1 -1
- package/lib/es/avatar/avatar.css +5 -5
- package/lib/es/badge/badge.css +1 -1
- package/lib/es/breadcrumb/breadcrumb.css +2 -2
- package/lib/es/calendar/calendar.css +9 -9
- package/lib/es/cascader/cascader.css +6 -6
- package/lib/es/cascader/foundation.d.ts +12 -0
- package/lib/es/cascader/foundation.js +68 -23
- package/lib/es/checkbox/checkbox.css +2 -2
- package/lib/es/codeHighlight/codeHighlight.css +1 -1
- package/lib/es/codeHighlight/codeHighlight.scss +1 -1
- package/lib/es/collapse/collapse.css +2 -2
- package/lib/es/datePicker/datePicker.css +75 -13
- package/lib/es/datePicker/datePicker.scss +100 -5
- package/lib/es/datePicker/foundation.d.ts +5 -0
- package/lib/es/datePicker/foundation.js +2 -0
- package/lib/es/datePicker/inputFoundation.d.ts +5 -0
- package/lib/es/descriptions/descriptions.css +6 -6
- package/lib/es/dropdown/dropdown.css +2 -2
- package/lib/es/form/form.css +4 -4
- package/lib/es/form/foundation.d.ts +1 -1
- package/lib/es/form/foundation.js +55 -9
- package/lib/es/form/utils.js +5 -2
- package/lib/es/hotKeys/hotKeys.css +2 -2
- package/lib/es/image/image.css +2 -2
- package/lib/es/image/previewImageFoundation.d.ts +4 -0
- package/lib/es/image/previewImageFoundation.js +33 -2
- package/lib/es/image/previewInnerFoundation.d.ts +1 -0
- package/lib/es/image/previewInnerFoundation.js +17 -4
- package/lib/es/input/input.css +8 -8
- package/lib/es/input/textarea.css +19 -2
- package/lib/es/input/textarea.scss +35 -0
- package/lib/es/inputNumber/foundation.d.ts +15 -0
- package/lib/es/inputNumber/foundation.js +113 -3
- package/lib/es/jsonViewer/jsonViewer.css +2 -2
- package/lib/es/jsonViewer/jsonViewer.scss +2 -2
- package/lib/es/list/list.css +1 -1
- package/lib/es/modal/modal.css +1 -1
- package/lib/es/navigation/navigation.css +4 -3
- package/lib/es/navigation/navigation.scss +1 -0
- package/lib/es/navigation/variables.scss +1 -1
- package/lib/es/notification/notification.css +4 -4
- package/lib/es/overflowList/foundation.d.ts +1 -0
- package/lib/es/overflowList/foundation.js +51 -1
- package/lib/es/pagination/pagination.css +5 -5
- package/lib/es/popconfirm/popconfirm.css +1 -1
- package/lib/es/popover/popover.css +1 -1
- package/lib/es/radio/radio.css +2 -2
- package/lib/es/scrollList/itemFoundation.js +12 -0
- package/lib/es/scrollList/scrollList.css +2 -2
- package/lib/es/select/foundation.d.ts +1 -1
- package/lib/es/select/foundation.js +28 -2
- package/lib/es/select/select.css +6 -6
- package/lib/es/sideSheet/sideSheet.css +2 -2
- package/lib/es/sidebar/sidebar.css +11 -11
- package/lib/es/slider/foundation.js +46 -12
- package/lib/es/slider/rtl.scss +62 -0
- package/lib/es/slider/slider.css +45 -0
- package/lib/es/slider/slider.scss +2 -0
- package/lib/es/steps/steps.css +11 -11
- package/lib/es/switch/switch.css +1 -0
- package/lib/es/switch/switch.scss +1 -0
- package/lib/es/switch/variables.scss +2 -1
- package/lib/es/table/foundation.d.ts +36 -0
- package/lib/es/table/foundation.js +164 -29
- package/lib/es/table/table.css +10 -2
- package/lib/es/table/table.scss +17 -0
- package/lib/es/tabs/tabs.css +2 -2
- package/lib/es/tag/tag.css +28 -2
- package/lib/es/tag/tag.scss +33 -0
- package/lib/es/tagInput/tagInput.css +19 -2
- package/lib/es/tagInput/tagInput.scss +18 -0
- package/lib/es/timePicker/constants.d.ts +1 -0
- package/lib/es/timePicker/foundation.d.ts +7 -1
- package/lib/es/timePicker/foundation.js +62 -11
- package/lib/es/timePicker/timePicker.css +1 -1
- package/lib/es/timeline/timeline.css +2 -2
- package/lib/es/toast/toast.css +1 -1
- package/lib/es/tooltip/foundation.js +8 -5
- package/lib/es/tooltip/tooltip.css +1 -1
- package/lib/es/transfer/constants.d.ts +3 -1
- package/lib/es/transfer/constants.js +3 -1
- package/lib/es/transfer/foundation.d.ts +3 -0
- package/lib/es/transfer/foundation.js +4 -0
- package/lib/es/transfer/transfer.css +14 -5
- package/lib/es/transfer/transfer.scss +10 -0
- package/lib/es/tree/foundation.d.ts +3 -0
- package/lib/es/tree/foundation.js +31 -4
- package/lib/es/tree/tree.css +1 -1
- package/lib/es/treeSelect/foundation.d.ts +1 -0
- package/lib/es/treeSelect/foundation.js +8 -1
- package/lib/es/treeSelect/treeSelect.css +36 -4
- package/lib/es/treeSelect/treeSelect.scss +49 -1
- package/lib/es/typography/typography.css +8 -8
- package/lib/es/upload/upload.css +8 -8
- package/lib/es/utils/Store.d.ts +1 -1
- package/lib/es/utils/Store.js +1 -0
- package/navigation/navigation.scss +1 -0
- package/navigation/variables.scss +1 -1
- package/overflowList/foundation.ts +48 -2
- package/package.json +19 -4
- package/scrollList/itemFoundation.ts +12 -0
- package/select/foundation.ts +27 -2
- package/slider/foundation.ts +55 -15
- package/slider/rtl.scss +62 -0
- package/slider/slider.scss +2 -0
- package/switch/switch.scss +1 -0
- package/switch/variables.scss +2 -1
- package/table/foundation.ts +199 -30
- package/table/table.scss +17 -0
- package/tag/tag.scss +33 -0
- package/tagInput/tagInput.scss +18 -0
- package/timePicker/constants.ts +2 -0
- package/timePicker/foundation.ts +62 -10
- package/tooltip/foundation.ts +8 -5
- package/transfer/constants.ts +3 -1
- package/transfer/foundation.ts +8 -1
- package/transfer/transfer.scss +10 -0
- package/tree/foundation.ts +34 -5
- package/treeSelect/foundation.ts +10 -1
- package/treeSelect/treeSelect.scss +49 -1
- package/utils/Store.ts +2 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
$module: #{$prefix}-slider;
|
|
2
|
+
|
|
3
|
+
// RTL support (horizontal)
|
|
4
|
+
// Slider uses `left` positioning in LTR. In RTL we switch to `right` positioning
|
|
5
|
+
// in the component logic, so centering transforms must be mirrored.
|
|
6
|
+
.#{$prefix}-rtl,
|
|
7
|
+
.#{$prefix}-portal-rtl {
|
|
8
|
+
.#{$module} {
|
|
9
|
+
direction: rtl;
|
|
10
|
+
|
|
11
|
+
&-handle {
|
|
12
|
+
transform: $transform_scale-slider_handle translateX(50%) translateY($spacing-slider_handle-translateY);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&-mark {
|
|
16
|
+
transform: translate(50%, 0);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&-mark-reverse {
|
|
20
|
+
transform: translate(50%, 0) rotate(-180deg);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Boundary text should match RTL direction: min on the right, max on the left
|
|
24
|
+
|
|
25
|
+
&-boundary-min {
|
|
26
|
+
left: auto;
|
|
27
|
+
right: $spacing-slider_boundary_min-left;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&-boundary-max {
|
|
31
|
+
right: auto;
|
|
32
|
+
left: $spacing-slider_boundary_max-right;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Backward/explicit support: the component may add `semi-slider-rtl` on wrapper.
|
|
38
|
+
// Keep these rules so RTL transforms still apply even without `.semi-rtl` container.
|
|
39
|
+
|
|
40
|
+
.#{$module}-rtl {
|
|
41
|
+
.#{$module}-handle {
|
|
42
|
+
transform: $transform_scale-slider_handle translateX(50%) translateY($spacing-slider_handle-translateY);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.#{$module}-mark {
|
|
46
|
+
transform: translate(50%, 0);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.#{$module}-mark-reverse {
|
|
50
|
+
transform: translate(50%, 0) rotate(-180deg);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.#{$module}-boundary-min {
|
|
54
|
+
left: auto;
|
|
55
|
+
right: $spacing-slider_boundary_min-left;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.#{$module}-boundary-max {
|
|
59
|
+
right: auto;
|
|
60
|
+
left: $spacing-slider_boundary_max-right;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -208,4 +208,49 @@
|
|
|
208
208
|
|
|
209
209
|
.semi-slider-reverse {
|
|
210
210
|
transform: rotate(180deg);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.semi-rtl .semi-slider,
|
|
214
|
+
.semi-portal-rtl .semi-slider {
|
|
215
|
+
direction: rtl;
|
|
216
|
+
}
|
|
217
|
+
.semi-rtl .semi-slider-handle,
|
|
218
|
+
.semi-portal-rtl .semi-slider-handle {
|
|
219
|
+
transform: var(--semi-transform_scale-small) translateX(50%) translateY(0px);
|
|
220
|
+
}
|
|
221
|
+
.semi-rtl .semi-slider-mark,
|
|
222
|
+
.semi-portal-rtl .semi-slider-mark {
|
|
223
|
+
transform: translate(50%, 0);
|
|
224
|
+
}
|
|
225
|
+
.semi-rtl .semi-slider-mark-reverse,
|
|
226
|
+
.semi-portal-rtl .semi-slider-mark-reverse {
|
|
227
|
+
transform: translate(50%, 0) rotate(-180deg);
|
|
228
|
+
}
|
|
229
|
+
.semi-rtl .semi-slider-boundary-min,
|
|
230
|
+
.semi-portal-rtl .semi-slider-boundary-min {
|
|
231
|
+
left: auto;
|
|
232
|
+
right: 0px;
|
|
233
|
+
}
|
|
234
|
+
.semi-rtl .semi-slider-boundary-max,
|
|
235
|
+
.semi-portal-rtl .semi-slider-boundary-max {
|
|
236
|
+
right: auto;
|
|
237
|
+
left: 0px;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.semi-slider-rtl .semi-slider-handle {
|
|
241
|
+
transform: var(--semi-transform_scale-small) translateX(50%) translateY(0px);
|
|
242
|
+
}
|
|
243
|
+
.semi-slider-rtl .semi-slider-mark {
|
|
244
|
+
transform: translate(50%, 0);
|
|
245
|
+
}
|
|
246
|
+
.semi-slider-rtl .semi-slider-mark-reverse {
|
|
247
|
+
transform: translate(50%, 0) rotate(-180deg);
|
|
248
|
+
}
|
|
249
|
+
.semi-slider-rtl .semi-slider-boundary-min {
|
|
250
|
+
left: auto;
|
|
251
|
+
right: 0px;
|
|
252
|
+
}
|
|
253
|
+
.semi-slider-rtl .semi-slider-boundary-max {
|
|
254
|
+
right: auto;
|
|
255
|
+
left: 0px;
|
|
211
256
|
}
|
package/lib/cjs/steps/steps.css
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
position: relative;
|
|
26
26
|
font-size: 18px;
|
|
27
27
|
line-height: 24px;
|
|
28
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
28
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
29
29
|
font-weight: 600;
|
|
30
30
|
width: 100%;
|
|
31
31
|
overflow: hidden;
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
.semi-steps .semi-steps-item .semi-steps-item-description {
|
|
38
38
|
font-size: 14px;
|
|
39
39
|
line-height: 20px;
|
|
40
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
40
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
41
41
|
color: var(--semi-color-text-2);
|
|
42
42
|
width: 100%;
|
|
43
43
|
overflow: hidden;
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
justify-content: center;
|
|
129
129
|
font-size: 20px;
|
|
130
130
|
line-height: 28px;
|
|
131
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
131
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
132
132
|
font-weight: 600;
|
|
133
133
|
flex-grow: 0;
|
|
134
134
|
}
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
.semi-steps-basic.semi-steps-horizontal .semi-steps-item .semi-steps-item-description {
|
|
184
184
|
font-size: 12px;
|
|
185
185
|
line-height: 16px;
|
|
186
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
186
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
187
187
|
color: var(--semi-color-text-2);
|
|
188
188
|
width: 100%;
|
|
189
189
|
max-width: 268px;
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
.semi-steps-basic.semi-steps-vertical .semi-steps-item .semi-steps-item-description {
|
|
251
251
|
font-size: 12px;
|
|
252
252
|
line-height: 16px;
|
|
253
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
253
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
254
254
|
color: var(--semi-color-text-2);
|
|
255
255
|
width: 100%;
|
|
256
256
|
}
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
height: 24px;
|
|
305
305
|
font-size: 16px;
|
|
306
306
|
line-height: 22px;
|
|
307
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
307
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
308
308
|
font-weight: 600;
|
|
309
309
|
background: var(--semi-color-primary);
|
|
310
310
|
border-radius: var(--semi-border-radius-circle);
|
|
@@ -316,7 +316,7 @@
|
|
|
316
316
|
display: inline-block;
|
|
317
317
|
font-size: 16px;
|
|
318
318
|
line-height: 22px;
|
|
319
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
319
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
320
320
|
line-height: 24px;
|
|
321
321
|
font-weight: 600;
|
|
322
322
|
color: var(--semi-color-text-0);
|
|
@@ -366,7 +366,7 @@
|
|
|
366
366
|
.semi-steps-basic.semi-steps-small .semi-steps-item .semi-steps-item-title {
|
|
367
367
|
font-size: 14px;
|
|
368
368
|
line-height: 20px;
|
|
369
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
369
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
370
370
|
}
|
|
371
371
|
.semi-steps-basic.semi-steps-small .semi-steps-item .semi-steps-item-left .semi-steps-item-icon {
|
|
372
372
|
height: 20px;
|
|
@@ -374,7 +374,7 @@
|
|
|
374
374
|
.semi-steps-basic.semi-steps-small .semi-steps-item .semi-steps-item-left .semi-steps-item-icon .semi-steps-item-number-icon {
|
|
375
375
|
font-size: 12px;
|
|
376
376
|
line-height: 16px;
|
|
377
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
377
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
378
378
|
width: 20px;
|
|
379
379
|
height: 20px;
|
|
380
380
|
}
|
|
@@ -411,7 +411,7 @@
|
|
|
411
411
|
.semi-steps-nav .semi-steps-item .semi-steps-item-title {
|
|
412
412
|
font-size: 16px;
|
|
413
413
|
line-height: 22px;
|
|
414
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
414
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
415
415
|
max-width: 17em;
|
|
416
416
|
overflow: hidden;
|
|
417
417
|
text-overflow: ellipsis;
|
|
@@ -425,7 +425,7 @@
|
|
|
425
425
|
.semi-steps-nav.semi-steps-small .semi-steps-item .semi-steps-item-title {
|
|
426
426
|
font-size: 14px;
|
|
427
427
|
line-height: 20px;
|
|
428
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
428
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
429
429
|
}
|
|
430
430
|
|
|
431
431
|
.semi-rtl .semi-steps,
|
|
@@ -30,7 +30,8 @@ $color-switch_disabled-border-default: var(--semi-color-border); // 禁用态开
|
|
|
30
30
|
$color-switch_disabled-bg-hover: transparent; // 禁用态开关背景色 - 悬浮
|
|
31
31
|
$color-switch_checked_disabled-bg-default: var(--semi-color-success-disabled); // 禁用开启态开关背景颜色
|
|
32
32
|
$color-switch_checked_disabled-border-default: transparent; // 禁用开启态开关描边颜色
|
|
33
|
-
$color-switch_knob-bg-default: rgba(var(--semi-white), 1); // 开关滑块背景颜色
|
|
33
|
+
$color-switch_knob-bg-default: rgba(var(--semi-white), 1); // 开关滑块背景颜色 - 关闭态
|
|
34
|
+
$color-switch_knob-bg-checked: rgba(var(--semi-white), 1); // 开关滑块背景颜色 - 开启态
|
|
34
35
|
$color-switch_knob-border-default: var(--semi-color-border); // 开关滑块描边颜色
|
|
35
36
|
$color-switch_checked-text-default: var(--semi-color-white); // 开启态开关文案颜色
|
|
36
37
|
$color-switch_unchecked-text-default: var(--semi-color-text-2); // 关闭态开关文案颜色
|
|
@@ -55,8 +55,11 @@ export interface TableAdapter<RecordType> extends DefaultAdapter {
|
|
|
55
55
|
setFlattenData: (flattenData: RecordType[]) => void;
|
|
56
56
|
setAllRowKeys: (allRowKeys: BaseRowKeyType[]) => void;
|
|
57
57
|
setHoveredRowKey: (hoveredRowKey: BaseRowKeyType) => void;
|
|
58
|
+
setHoveredRowKeys: (hoveredRowKeys: BaseRowKeyType[]) => void;
|
|
58
59
|
setCachedFilteredSortedDataSource: (filteredSortedDataSource: RecordType[]) => void;
|
|
59
60
|
setCachedFilteredSortedRowKeys: (filteredSortedRowKeys: BaseRowKeyType[]) => void;
|
|
61
|
+
setHalfCheckedRowKeys: (halfCheckedRowKeys: BaseRowKeyType[]) => void;
|
|
62
|
+
setKeyEntities: (keyEntities: BaseEntitys) => void;
|
|
60
63
|
getCurrentPage: () => number;
|
|
61
64
|
getCurrentPageSize: () => number;
|
|
62
65
|
getCachedFilteredSortedDataSource: () => RecordType[];
|
|
@@ -65,6 +68,9 @@ export interface TableAdapter<RecordType> extends DefaultAdapter {
|
|
|
65
68
|
setAllDisabledRowKeys: (allDisabledRowKeys: BaseRowKeyType[]) => void;
|
|
66
69
|
getAllDisabledRowKeys: () => BaseRowKeyType[];
|
|
67
70
|
getAllDisabledRowKeysSet: () => Set<BaseRowKeyType>;
|
|
71
|
+
getHalfCheckedRowKeys: () => BaseRowKeyType[];
|
|
72
|
+
getHalfCheckedRowKeysSet: () => Set<BaseRowKeyType>;
|
|
73
|
+
getKeyEntities: () => BaseEntitys;
|
|
68
74
|
notifyFilterDropdownVisibleChange: (visible: boolean, dataIndex: string) => void;
|
|
69
75
|
notifyChange: (changeInfo: {
|
|
70
76
|
pagination: BasePagination;
|
|
@@ -90,6 +96,7 @@ export interface TableAdapter<RecordType> extends DefaultAdapter {
|
|
|
90
96
|
getMergePagination: () => (pagination: BasePagination) => BasePagination;
|
|
91
97
|
setBodyHasScrollbar: (bodyHasScrollBar: boolean) => void;
|
|
92
98
|
getTableLayout: () => 'fixed' | 'auto';
|
|
99
|
+
getCheckRelation: () => CheckRelation;
|
|
93
100
|
}
|
|
94
101
|
declare class TableFoundation<RecordType> extends BaseFoundation<TableAdapter<RecordType>> {
|
|
95
102
|
memoizedWithFnsColumns: (queries: BaseColumnProps<RecordType>[], cachedColumns: BaseColumnProps<RecordType>[], rowSelectionUpdate: boolean, hideExpandedColumn: boolean, bodyHasScrollBar: boolean) => BaseColumnProps<RecordType>[];
|
|
@@ -223,6 +230,23 @@ declare class TableFoundation<RecordType> extends BaseFoundation<TableAdapter<Re
|
|
|
223
230
|
*/
|
|
224
231
|
getRecordKey(record: RecordType): string;
|
|
225
232
|
isEmpty(dataSource: RecordType[]): boolean;
|
|
233
|
+
/**
|
|
234
|
+
* Build tree data entities for checkRelation
|
|
235
|
+
* @param dataSource
|
|
236
|
+
* @returns keyEntities map
|
|
237
|
+
*/
|
|
238
|
+
buildKeyEntities(dataSource?: RecordType[]): BaseEntitys;
|
|
239
|
+
/**
|
|
240
|
+
* Calculate checked keys when checkRelation is 'related'
|
|
241
|
+
* @param realKey
|
|
242
|
+
* @param selected
|
|
243
|
+
* @param checkedKeys
|
|
244
|
+
* @param halfCheckedKeys
|
|
245
|
+
*/
|
|
246
|
+
calcCheckedKeysForSelect(realKey: BaseRowKeyType, selected: boolean, checkedKeys: Set<string>, halfCheckedKeys: Set<string>): {
|
|
247
|
+
checkedKeys: Set<string>;
|
|
248
|
+
halfCheckedKeys: Set<string>;
|
|
249
|
+
};
|
|
226
250
|
handleSelectRow(realKey: BaseRowKeyType, selected: boolean, e: any): void;
|
|
227
251
|
/**
|
|
228
252
|
* select all rows
|
|
@@ -381,4 +405,16 @@ export type BaseIncludeGroupRecord<RecordType> = RecordType | {
|
|
|
381
405
|
export type BaseEllipsis = boolean | {
|
|
382
406
|
showTitle: boolean;
|
|
383
407
|
};
|
|
408
|
+
export type CheckRelation = 'related' | 'unRelated';
|
|
409
|
+
export interface BaseEntity {
|
|
410
|
+
key?: string | number;
|
|
411
|
+
level?: number;
|
|
412
|
+
children?: BaseEntity[];
|
|
413
|
+
parent?: BaseEntity | null;
|
|
414
|
+
data?: Record<string, any>;
|
|
415
|
+
[key: string]: any;
|
|
416
|
+
}
|
|
417
|
+
export interface BaseEntitys {
|
|
418
|
+
[key: string]: BaseEntity;
|
|
419
|
+
}
|
|
384
420
|
export default TableFoundation;
|
|
@@ -22,6 +22,7 @@ var _foundation = _interopRequireDefault(require("../base/foundation"));
|
|
|
22
22
|
var _constants = require("./constants");
|
|
23
23
|
var _utils = require("./utils");
|
|
24
24
|
var _array = require("../utils/array");
|
|
25
|
+
var _treeUtil = require("../tree/treeUtil");
|
|
25
26
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
26
27
|
class TableFoundation extends _foundation.default {
|
|
27
28
|
/**
|
|
@@ -594,29 +595,115 @@ class TableFoundation extends _foundation.default {
|
|
|
594
595
|
dataSource = dataSource == null ? this.getProp('dataSource') : dataSource;
|
|
595
596
|
return !(Array.isArray(dataSource) && dataSource.length > 0);
|
|
596
597
|
}
|
|
598
|
+
/**
|
|
599
|
+
* Build tree data entities for checkRelation
|
|
600
|
+
* @param dataSource
|
|
601
|
+
* @returns keyEntities map
|
|
602
|
+
*/
|
|
603
|
+
buildKeyEntities(dataSource) {
|
|
604
|
+
dataSource = dataSource == null ? this._getDataSource() : dataSource;
|
|
605
|
+
const childrenRecordName = this.getProp('childrenRecordName');
|
|
606
|
+
const rowKey = this.getProp('rowKey');
|
|
607
|
+
// Convert table data to tree data format
|
|
608
|
+
const convertToTreeData = data => {
|
|
609
|
+
return data.map(record => {
|
|
610
|
+
const key = typeof rowKey === 'function' ? rowKey(record) : (0, _get2.default)(record, rowKey);
|
|
611
|
+
const children = (0, _get2.default)(record, childrenRecordName);
|
|
612
|
+
const node = Object.assign({
|
|
613
|
+
key
|
|
614
|
+
}, record);
|
|
615
|
+
if (Array.isArray(children) && children.length) {
|
|
616
|
+
node.children = convertToTreeData(children);
|
|
617
|
+
}
|
|
618
|
+
return node;
|
|
619
|
+
});
|
|
620
|
+
};
|
|
621
|
+
const treeData = convertToTreeData(dataSource);
|
|
622
|
+
const {
|
|
623
|
+
keyEntities
|
|
624
|
+
} = (0, _treeUtil.convertDataToEntities)(treeData, {
|
|
625
|
+
key: 'key',
|
|
626
|
+
children: 'children'
|
|
627
|
+
});
|
|
628
|
+
return keyEntities;
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* Calculate checked keys when checkRelation is 'related'
|
|
632
|
+
* @param realKey
|
|
633
|
+
* @param selected
|
|
634
|
+
* @param checkedKeys
|
|
635
|
+
* @param halfCheckedKeys
|
|
636
|
+
*/
|
|
637
|
+
calcCheckedKeysForSelect(realKey, selected, checkedKeys, halfCheckedKeys) {
|
|
638
|
+
const keyEntities = this._adapter.getKeyEntities();
|
|
639
|
+
const keyStr = String(realKey);
|
|
640
|
+
// If keyEntities doesn't contain this key, handle it as a simple add/remove
|
|
641
|
+
if (!keyEntities || !keyEntities[keyStr]) {
|
|
642
|
+
if (selected) {
|
|
643
|
+
checkedKeys.add(keyStr);
|
|
644
|
+
} else {
|
|
645
|
+
checkedKeys.delete(keyStr);
|
|
646
|
+
}
|
|
647
|
+
return {
|
|
648
|
+
checkedKeys,
|
|
649
|
+
halfCheckedKeys
|
|
650
|
+
};
|
|
651
|
+
}
|
|
652
|
+
if (selected) {
|
|
653
|
+
return (0, _treeUtil.calcCheckedKeysForChecked)(keyStr, keyEntities, checkedKeys, halfCheckedKeys);
|
|
654
|
+
} else {
|
|
655
|
+
return (0, _treeUtil.calcCheckedKeysForUnchecked)(keyStr, keyEntities, checkedKeys, halfCheckedKeys);
|
|
656
|
+
}
|
|
657
|
+
}
|
|
597
658
|
handleSelectRow(realKey, selected, e) {
|
|
598
659
|
this.stopPropagation(e);
|
|
599
660
|
if (typeof selected === 'boolean' && realKey != null) {
|
|
661
|
+
const checkRelation = this._adapter.getCheckRelation();
|
|
600
662
|
const selectedRowKeys = this._getSelectedRowKeys();
|
|
663
|
+
const halfCheckedRowKeys = [...(this._adapter.getHalfCheckedRowKeys() || [])];
|
|
601
664
|
let foundIdx = -1;
|
|
602
665
|
const selectedRow = this.getSelectedRows(null, [realKey])[0];
|
|
603
666
|
let selectedRows;
|
|
604
|
-
if (
|
|
605
|
-
|
|
606
|
-
|
|
667
|
+
if (checkRelation === 'related') {
|
|
668
|
+
// When checkRelation is 'related', use tree selection logic
|
|
669
|
+
const keyEntities = this._adapter.getKeyEntities();
|
|
670
|
+
// Convert keys to strings for tree utility functions
|
|
671
|
+
const checkedKeysSet = new Set(selectedRowKeys.map(key => String(key)));
|
|
672
|
+
const halfCheckedKeysSet = new Set(halfCheckedRowKeys.map(key => String(key)));
|
|
673
|
+
const {
|
|
674
|
+
checkedKeys,
|
|
675
|
+
halfCheckedKeys
|
|
676
|
+
} = this.calcCheckedKeysForSelect(String(realKey), selected, checkedKeysSet, halfCheckedKeysSet);
|
|
677
|
+
const newSelectedRowKeys = [...checkedKeys];
|
|
678
|
+
const newHalfCheckedRowKeys = [...halfCheckedKeys];
|
|
679
|
+
selectedRows = this.getSelectedRows(null, newSelectedRowKeys);
|
|
680
|
+
// Always update halfCheckedRowKeys state for checkRelation='related' mode
|
|
681
|
+
// This is needed for rendering the half-checked state in the UI
|
|
682
|
+
this._adapter.setHalfCheckedRowKeys(newHalfCheckedRowKeys);
|
|
607
683
|
if (!this._selectionIsControlled()) {
|
|
608
|
-
this._adapter.setSelectedRowKeys(
|
|
684
|
+
this._adapter.setSelectedRowKeys(newSelectedRowKeys);
|
|
609
685
|
}
|
|
610
686
|
this._adapter.notifySelect(selectedRow, selected, selectedRows, e);
|
|
611
|
-
this._adapter.notifySelectionChange(
|
|
612
|
-
} else
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
this.
|
|
687
|
+
this._adapter.notifySelectionChange(newSelectedRowKeys, selectedRows);
|
|
688
|
+
} else {
|
|
689
|
+
// Original logic for unRelated mode
|
|
690
|
+
if ((foundIdx = selectedRowKeys.indexOf(realKey)) > -1 && selected === false) {
|
|
691
|
+
selectedRowKeys.splice(foundIdx, 1);
|
|
692
|
+
selectedRows = this.getSelectedRows(null, selectedRowKeys);
|
|
693
|
+
if (!this._selectionIsControlled()) {
|
|
694
|
+
this._adapter.setSelectedRowKeys(selectedRowKeys);
|
|
695
|
+
}
|
|
696
|
+
this._adapter.notifySelect(selectedRow, selected, selectedRows, e);
|
|
697
|
+
this._adapter.notifySelectionChange(selectedRowKeys, selectedRows);
|
|
698
|
+
} else if (selectedRowKeys.indexOf(realKey) === -1 && selected === true) {
|
|
699
|
+
selectedRowKeys.push(realKey);
|
|
700
|
+
selectedRows = this.getSelectedRows(null, selectedRowKeys);
|
|
701
|
+
if (!this._selectionIsControlled()) {
|
|
702
|
+
this._adapter.setSelectedRowKeys(selectedRowKeys);
|
|
703
|
+
}
|
|
704
|
+
this._adapter.notifySelect(selectedRow, selected, selectedRows, e);
|
|
705
|
+
this._adapter.notifySelectionChange(selectedRowKeys, selectedRows);
|
|
617
706
|
}
|
|
618
|
-
this._adapter.notifySelect(selectedRow, selected, selectedRows, e);
|
|
619
|
-
this._adapter.notifySelectionChange(selectedRowKeys, selectedRows);
|
|
620
707
|
}
|
|
621
708
|
}
|
|
622
709
|
}
|
|
@@ -628,6 +715,7 @@ class TableFoundation extends _foundation.default {
|
|
|
628
715
|
handleSelectAllRow(selected, e) {
|
|
629
716
|
this.stopPropagation(e);
|
|
630
717
|
if (typeof selected === 'boolean') {
|
|
718
|
+
const checkRelation = this._adapter.getCheckRelation();
|
|
631
719
|
const curSelectedRowKeys = this._getSelectedRowKeys();
|
|
632
720
|
let selectedRowKeys = [...curSelectedRowKeys];
|
|
633
721
|
const selectedRowKeysSet = this._getSelectedRowKeysSet();
|
|
@@ -635,26 +723,72 @@ class TableFoundation extends _foundation.default {
|
|
|
635
723
|
const disabledRowKeys = this._adapter.getAllDisabledRowKeys();
|
|
636
724
|
const disabledRowKeysSet = this._adapter.getAllDisabledRowKeysSet();
|
|
637
725
|
let changedRowKeys;
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
726
|
+
if (checkRelation === 'related') {
|
|
727
|
+
// When checkRelation is 'related', use tree selection logic
|
|
728
|
+
const keyEntities = this._adapter.getKeyEntities();
|
|
729
|
+
const halfCheckedRowKeys = [...(this._adapter.getHalfCheckedRowKeys() || [])];
|
|
730
|
+
// Convert keys to strings for tree utility functions
|
|
731
|
+
let checkedKeysSet = new Set(selectedRowKeys.map(key => String(key)));
|
|
732
|
+
let halfCheckedKeysSet = new Set(halfCheckedRowKeys.map(key => String(key)));
|
|
733
|
+
if (selected) {
|
|
734
|
+
// Select all: add all non-disabled keys
|
|
735
|
+
const keysToAdd = allRowKeys.filter(key => !disabledRowKeysSet.has(key));
|
|
736
|
+
for (const key of keysToAdd) {
|
|
737
|
+
const keyStr = String(key);
|
|
738
|
+
if (!checkedKeysSet.has(keyStr) && keyEntities && keyEntities[keyStr]) {
|
|
739
|
+
const result = (0, _treeUtil.calcCheckedKeysForChecked)(keyStr, keyEntities, checkedKeysSet, halfCheckedKeysSet);
|
|
740
|
+
checkedKeysSet = result.checkedKeys;
|
|
741
|
+
halfCheckedKeysSet = result.halfCheckedKeys;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
changedRowKeys = keysToAdd;
|
|
745
|
+
} else {
|
|
746
|
+
// Deselect all: remove all keys
|
|
747
|
+
const keysToRemove = [...checkedKeysSet];
|
|
748
|
+
for (const key of keysToRemove) {
|
|
749
|
+
if (keyEntities && keyEntities[key]) {
|
|
750
|
+
const result = (0, _treeUtil.calcCheckedKeysForUnchecked)(key, keyEntities, checkedKeysSet, halfCheckedKeysSet);
|
|
751
|
+
checkedKeysSet = result.checkedKeys;
|
|
752
|
+
halfCheckedKeysSet = result.halfCheckedKeys;
|
|
753
|
+
}
|
|
643
754
|
}
|
|
755
|
+
changedRowKeys = [...curSelectedRowKeys];
|
|
756
|
+
}
|
|
757
|
+
selectedRowKeys = [...checkedKeysSet];
|
|
758
|
+
const newHalfCheckedRowKeys = [...halfCheckedKeysSet];
|
|
759
|
+
const changedRows = this.getSelectedRows(null, changedRowKeys || []);
|
|
760
|
+
const selectedRows = this.getSelectedRows(null, selectedRowKeys || []);
|
|
761
|
+
// Always update halfCheckedRowKeys state for checkRelation='related' mode
|
|
762
|
+
// This is needed for rendering the half-checked state in the UI
|
|
763
|
+
this._adapter.setHalfCheckedRowKeys(newHalfCheckedRowKeys);
|
|
764
|
+
if (!this._selectionIsControlled()) {
|
|
765
|
+
this._adapter.setSelectedRowKeys(selectedRowKeys);
|
|
644
766
|
}
|
|
645
|
-
|
|
646
|
-
|
|
767
|
+
this._adapter.notifySelectAll(selected, selectedRows, changedRows, e);
|
|
768
|
+
this._adapter.notifySelectionChange(selectedRowKeys, selectedRows);
|
|
647
769
|
} else {
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
770
|
+
// Original logic for unRelated mode
|
|
771
|
+
// Select all, if not disabled && not in selectedRowKeys
|
|
772
|
+
if (selected) {
|
|
773
|
+
for (const key of allRowKeys) {
|
|
774
|
+
if (!disabledRowKeysSet.has(key) && !selectedRowKeysSet.has(key)) {
|
|
775
|
+
selectedRowKeys.push(key);
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
allRowKeys = (0, _array.pullAll)(allRowKeys, [...disabledRowKeys, ...curSelectedRowKeys]);
|
|
779
|
+
changedRowKeys = [...allRowKeys];
|
|
780
|
+
} else {
|
|
781
|
+
selectedRowKeys = (0, _array.pullAll)(selectedRowKeys, allRowKeys);
|
|
782
|
+
changedRowKeys = [...curSelectedRowKeys];
|
|
783
|
+
}
|
|
784
|
+
const changedRows = this.getSelectedRows(null, changedRowKeys || []);
|
|
785
|
+
const selectedRows = this.getSelectedRows(null, selectedRowKeys || []);
|
|
786
|
+
if (!this._selectionIsControlled()) {
|
|
787
|
+
this._adapter.setSelectedRowKeys(selectedRowKeys);
|
|
788
|
+
}
|
|
789
|
+
this._adapter.notifySelectAll(selected, selectedRows, changedRows, e);
|
|
790
|
+
this._adapter.notifySelectionChange(selectedRowKeys, selectedRows);
|
|
655
791
|
}
|
|
656
|
-
this._adapter.notifySelectAll(selected, selectedRows, changedRows, e);
|
|
657
|
-
this._adapter.notifySelectionChange(selectedRowKeys, selectedRows);
|
|
658
792
|
}
|
|
659
793
|
}
|
|
660
794
|
/**
|
|
@@ -888,7 +1022,8 @@ class TableFoundation extends _foundation.default {
|
|
|
888
1022
|
let e = arguments.length > 1 ? arguments[1] : undefined;
|
|
889
1023
|
let check = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
890
1024
|
var _a, _b, _c, _d;
|
|
891
|
-
|
|
1025
|
+
/* Do not call stopPropagation here, otherwise the click event registered via onHeaderCell
|
|
1026
|
+
will be blocked when the click hot area is the whole title (#1861). */
|
|
892
1027
|
/* if mouse down to the resizable handle, do not trigger the sorting,fix #2802
|
|
893
1028
|
The target of the click event may be different from the target of the mousedown,
|
|
894
1029
|
e.g: Press the mouse, move to another node and then release it,
|
package/lib/cjs/table/table.css
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
.semi-table-pagination-info {
|
|
23
23
|
font-size: 14px;
|
|
24
24
|
line-height: 20px;
|
|
25
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
25
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
26
26
|
font-weight: 400;
|
|
27
27
|
}
|
|
28
28
|
.semi-table-pagination-outer {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
padding: 0;
|
|
49
49
|
font-size: 14px;
|
|
50
50
|
line-height: 20px;
|
|
51
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
51
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
52
52
|
color: var(--semi-color-text-0);
|
|
53
53
|
width: 100%;
|
|
54
54
|
}
|
|
@@ -222,6 +222,14 @@
|
|
|
222
222
|
display: table-row;
|
|
223
223
|
background-color: var(--semi-color-bg-1);
|
|
224
224
|
}
|
|
225
|
+
.semi-table-tbody > .semi-table-row.semi-table-row-hovered > .semi-table-row-cell {
|
|
226
|
+
background-image: linear-gradient(0deg, var(--semi-color-fill-0), var(--semi-color-fill-0));
|
|
227
|
+
background-color: var(--semi-color-bg-0);
|
|
228
|
+
}
|
|
229
|
+
.semi-table-tbody > .semi-table-row.semi-table-row-hovered > .semi-table-row-cell.semi-table-cell-fixed-left, .semi-table-tbody > .semi-table-row.semi-table-row-hovered > .semi-table-row-cell.semi-table-cell-fixed-right {
|
|
230
|
+
background-image: linear-gradient(0deg, var(--semi-color-fill-0), var(--semi-color-fill-0));
|
|
231
|
+
background-color: var(--semi-color-bg-1);
|
|
232
|
+
}
|
|
225
233
|
.semi-table-tbody > .semi-table-row:hover > .semi-table-row-cell {
|
|
226
234
|
background-image: linear-gradient(0deg, var(--semi-color-fill-0), var(--semi-color-fill-0));
|
|
227
235
|
background-color: var(--semi-color-bg-0);
|
package/lib/cjs/table/table.scss
CHANGED
|
@@ -259,6 +259,23 @@ $module: #{$prefix}-table;
|
|
|
259
259
|
display: table-row;
|
|
260
260
|
background-color: $color-table_body-bg-default;
|
|
261
261
|
|
|
262
|
+
// Programmatic hover state (e.g. rowSpanHover feature)
|
|
263
|
+
// Keep visual effect consistent with native :hover
|
|
264
|
+
&.#{$module}-row-hovered {
|
|
265
|
+
& > .#{$module}-row-cell {
|
|
266
|
+
background-image: linear-gradient(0deg, $color-table_body-bg-hover, $color-table_body-bg-hover);
|
|
267
|
+
background-color: $color-table_cell-bg-hover;
|
|
268
|
+
|
|
269
|
+
&.#{$module}-cell-fixed {
|
|
270
|
+
&-left,
|
|
271
|
+
&-right {
|
|
272
|
+
background-image: linear-gradient(0deg, $color-table_body-bg-hover, $color-table_body-bg-hover);
|
|
273
|
+
background-color: $color-table_body-bg-default;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
262
279
|
&:hover {
|
|
263
280
|
& > .#{$module}-row-cell {
|
|
264
281
|
// $color-table_body-bg-hover has transparency,will reveal the background color $color-table_body-bg-default\
|
package/lib/cjs/tabs/tabs.css
CHANGED
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
.semi-tabs-bar .semi-tabs-tab {
|
|
52
52
|
font-size: 14px;
|
|
53
53
|
line-height: 20px;
|
|
54
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
54
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
55
55
|
cursor: pointer;
|
|
56
56
|
box-sizing: border-box;
|
|
57
57
|
position: relative;
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
.semi-tabs-tab-single.semi-tabs-tab {
|
|
113
113
|
font-size: 14px;
|
|
114
114
|
line-height: 20px;
|
|
115
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
115
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
116
116
|
cursor: pointer;
|
|
117
117
|
box-sizing: border-box;
|
|
118
118
|
position: relative;
|