@douyinfe/semi-foundation 2.34.0-alpha.1 → 2.34.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/breadcrumb/breadcrumb.scss +4 -4
- package/calendar/eventUtil.ts +9 -7
- package/calendar/foundation.ts +4 -4
- package/cascader/foundation.ts +24 -13
- package/lib/cjs/breadcrumb/breadcrumb.css +0 -3
- package/lib/cjs/breadcrumb/breadcrumb.scss +4 -4
- package/lib/cjs/calendar/eventUtil.d.ts +7 -6
- package/lib/cjs/calendar/eventUtil.js +8 -6
- package/lib/cjs/calendar/foundation.d.ts +2 -2
- package/lib/cjs/calendar/foundation.js +2 -2
- package/lib/cjs/cascader/foundation.d.ts +3 -1
- package/lib/cjs/cascader/foundation.js +26 -8
- package/lib/cjs/navigation/itemFoundation.d.ts +0 -2
- package/lib/cjs/navigation/navigation.css +7 -77
- package/lib/cjs/navigation/navigation.scss +7 -119
- package/lib/cjs/navigation/subNavFoundation.d.ts +0 -2
- package/lib/cjs/radio/radio.css +1 -0
- package/lib/cjs/radio/radio.scss +1 -0
- package/lib/cjs/steps/bacisSteps.scss +238 -287
- package/lib/cjs/steps/fillSteps.scss +142 -153
- package/lib/cjs/steps/navSteps.scss +40 -61
- package/lib/cjs/steps/steps.css +28 -392
- package/lib/cjs/table/foundation.d.ts +5 -0
- package/lib/cjs/table/table.css +23 -5
- package/lib/cjs/table/table.scss +25 -5
- package/lib/cjs/table/utils.d.ts +2 -0
- package/lib/cjs/table/utils.js +6 -0
- package/lib/cjs/timePicker/foundation.js +15 -1
- package/lib/cjs/timeline/timeline.css +0 -36
- package/lib/cjs/timeline/timeline.scss +46 -96
- package/lib/cjs/tree/treeUtil.d.ts +1 -1
- package/lib/cjs/typography/typography.css +8 -0
- package/lib/cjs/typography/typography.scss +13 -0
- package/lib/cjs/upload/constants.d.ts +1 -1
- package/lib/es/breadcrumb/breadcrumb.css +0 -3
- package/lib/es/breadcrumb/breadcrumb.scss +4 -4
- package/lib/es/calendar/eventUtil.d.ts +7 -6
- package/lib/es/calendar/eventUtil.js +8 -6
- package/lib/es/calendar/foundation.d.ts +2 -2
- package/lib/es/calendar/foundation.js +2 -2
- package/lib/es/cascader/foundation.d.ts +3 -1
- package/lib/es/cascader/foundation.js +26 -8
- package/lib/es/navigation/itemFoundation.d.ts +0 -2
- package/lib/es/navigation/navigation.css +7 -77
- package/lib/es/navigation/navigation.scss +7 -119
- package/lib/es/navigation/subNavFoundation.d.ts +0 -2
- package/lib/es/radio/radio.css +1 -0
- package/lib/es/radio/radio.scss +1 -0
- package/lib/es/steps/bacisSteps.scss +238 -287
- package/lib/es/steps/fillSteps.scss +142 -153
- package/lib/es/steps/navSteps.scss +40 -61
- package/lib/es/steps/steps.css +28 -392
- package/lib/es/table/foundation.d.ts +5 -0
- package/lib/es/table/table.css +23 -5
- package/lib/es/table/table.scss +25 -5
- package/lib/es/table/utils.d.ts +2 -0
- package/lib/es/table/utils.js +5 -0
- package/lib/es/timePicker/foundation.js +14 -1
- package/lib/es/timeline/timeline.css +0 -36
- package/lib/es/timeline/timeline.scss +46 -96
- package/lib/es/tree/treeUtil.d.ts +1 -1
- package/lib/es/typography/typography.css +8 -0
- package/lib/es/typography/typography.scss +13 -0
- package/lib/es/upload/constants.d.ts +1 -1
- package/navigation/itemFoundation.ts +1 -3
- package/navigation/navigation.scss +7 -119
- package/navigation/subNavFoundation.ts +1 -3
- package/package.json +2 -2
- package/radio/radio.scss +1 -0
- package/steps/bacisSteps.scss +238 -287
- package/steps/fillSteps.scss +142 -153
- package/steps/navSteps.scss +40 -61
- package/table/foundation.ts +6 -2
- package/table/table.scss +25 -5
- package/table/utils.ts +6 -0
- package/timePicker/foundation.ts +12 -3
- package/timeline/timeline.scss +46 -96
- package/typography/typography.scss +13 -0
package/steps/fillSteps.scss
CHANGED
|
@@ -1,209 +1,198 @@
|
|
|
1
1
|
$module: #{$prefix}-steps;
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
display: flex;
|
|
7
|
-
height: $height-steps_item;
|
|
8
|
-
position: relative;
|
|
9
|
-
overflow: hidden;
|
|
10
|
-
// margin-right: $spacing-steps_item-marginRight;
|
|
11
|
-
border: $width-steps_item-border solid $color-steps-border-default;
|
|
12
|
-
border-radius: $radius-steps_item;
|
|
13
|
-
padding: $spacing-steps_item-paddingY $spacing-steps_item-paddingX;
|
|
14
|
-
transition: color $transition_duration-steps_item_title-text $transition_function-steps_item_title-text $transition_delay-steps_item_title-text; // item 字体颜色动效
|
|
15
|
-
transform:scale($transform_scale-step-item);
|
|
16
|
-
transition: background-color $transition_duration-steps_item-backgroundColor $transition_function-steps_item_backgroundColor $transition_delay-steps_item_backgroundColor; //step backgroundColor 的transition变化
|
|
17
|
-
column-gap: $spacing-steps_item_content-marginLeft;
|
|
18
|
-
|
|
19
|
-
.#{$module}-item-title {
|
|
20
|
-
position: relative;
|
|
21
|
-
// display: inline-block;
|
|
22
|
-
@include font-size-header-5;
|
|
23
|
-
font-weight: $font-weight-bold;
|
|
24
|
-
width: $width-steps_item_title;
|
|
25
|
-
@include text-overflow-hidden;
|
|
26
|
-
color: $color-steps_main-text-default;
|
|
27
|
-
transition: color $transition_duration-steps_item_title-text $transition_function-steps_item_title-text $transition_delay-steps_item_title-text
|
|
28
|
-
|
|
2
|
+
|
|
3
|
+
.#{$module} {
|
|
4
|
+
.#{$prefix}-col {
|
|
5
|
+
flex: 1;
|
|
29
6
|
}
|
|
30
7
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
@include text-overflow-hidden;
|
|
8
|
+
&-vertical {
|
|
9
|
+
.#{$prefix}-row-flex {
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
}
|
|
36
12
|
}
|
|
37
13
|
|
|
38
|
-
|
|
39
|
-
|
|
14
|
+
// .#{$module}-horizontal {
|
|
15
|
+
// .#{$module}-item-title {
|
|
16
|
+
// &-text {
|
|
17
|
+
// position: relative;
|
|
18
|
+
// &::after {
|
|
19
|
+
// content: '';
|
|
20
|
+
// display: block;
|
|
21
|
+
// width: 9999px;
|
|
22
|
+
// height: 1px;
|
|
23
|
+
// position: absolute;
|
|
24
|
+
// top: 12px;
|
|
25
|
+
// left: 120%;
|
|
26
|
+
// background-color: var(--semi-color-border);
|
|
27
|
+
// }
|
|
28
|
+
// }
|
|
29
|
+
// }
|
|
30
|
+
// }
|
|
40
31
|
|
|
41
|
-
|
|
42
|
-
|
|
32
|
+
.#{$module}-item {
|
|
33
|
+
@include box-sizing;
|
|
34
|
+
display: flex;
|
|
35
|
+
height: $height-steps_item;
|
|
36
|
+
position: relative;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
margin-right: $spacing-steps_item-marginRight;
|
|
39
|
+
border: $width-steps_item-border solid $color-steps-border-default;
|
|
40
|
+
border-radius: $radius-steps_item;
|
|
41
|
+
padding: $spacing-steps_item-paddingY $spacing-steps_item-paddingX;
|
|
42
|
+
transition: color $transition_duration-steps_item_title-text $transition_function-steps_item_title-text $transition_delay-steps_item_title-text; // item 字体颜色动效
|
|
43
|
+
transform:scale($transform_scale-step-item);
|
|
44
|
+
transition: background-color $transition_duration-steps_item-backgroundColor $transition_function-steps_item_backgroundColor $transition_delay-steps_item_backgroundColor; //step backgroundColor 的transition变化
|
|
45
|
+
|
|
46
|
+
.#{$module}-item-title {
|
|
47
|
+
position: relative;
|
|
48
|
+
// display: inline-block;
|
|
49
|
+
@include font-size-header-5;
|
|
50
|
+
font-weight: $font-weight-bold;
|
|
51
|
+
width: $width-steps_item_title;
|
|
52
|
+
@include text-overflow-hidden;
|
|
53
|
+
color: $color-steps_main-text-default;
|
|
54
|
+
transition: color $transition_duration-steps_item_title-text $transition_function-steps_item_title-text $transition_delay-steps_item_title-text
|
|
55
|
+
|
|
43
56
|
}
|
|
44
57
|
|
|
45
|
-
.#{$module}-item-
|
|
46
|
-
|
|
47
|
-
color: $color-
|
|
58
|
+
.#{$module}-item-description {
|
|
59
|
+
@include font-size-regular;
|
|
60
|
+
color: $color-steps_minor-text-default;
|
|
61
|
+
width: $width-steps_item_description;
|
|
62
|
+
@include text-overflow-hidden;
|
|
48
63
|
}
|
|
49
|
-
}
|
|
50
64
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
65
|
+
&-process {
|
|
66
|
+
background-color: $color-steps_process-bg-default;
|
|
67
|
+
|
|
68
|
+
.#{$module}-item-left:not(.#{$module}-item-icon) {
|
|
69
|
+
background: $color-steps_primary-bg-default;
|
|
70
|
+
}
|
|
55
71
|
|
|
56
|
-
|
|
57
|
-
|
|
72
|
+
.#{$module}-item-title,
|
|
73
|
+
.#{$module}-item-icon {
|
|
74
|
+
color: $color-steps_primary-icon-default;
|
|
75
|
+
}
|
|
58
76
|
}
|
|
59
|
-
}
|
|
60
77
|
|
|
61
|
-
|
|
78
|
+
&-wait {
|
|
79
|
+
.#{$module}-item-left:not(.#{$module}-item-icon) {
|
|
80
|
+
background: $color-steps-bg-default;
|
|
81
|
+
}
|
|
62
82
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
83
|
+
.#{$module}-item-icon {
|
|
84
|
+
color: $color-steps-icon-default;
|
|
85
|
+
}
|
|
66
86
|
}
|
|
67
87
|
|
|
68
|
-
|
|
69
|
-
background-color: $color-steps-bg-hover;
|
|
88
|
+
&-finish {
|
|
70
89
|
|
|
71
90
|
.#{$prefix}-icon,
|
|
72
91
|
.#{$module}-item-title {
|
|
73
|
-
color: $color-steps_success-text-
|
|
92
|
+
color: $color-steps_success-text-default;
|
|
74
93
|
}
|
|
75
|
-
}
|
|
76
94
|
|
|
77
|
-
|
|
78
|
-
|
|
95
|
+
&-hover:hover {
|
|
96
|
+
background-color: $color-steps-bg-hover;
|
|
79
97
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
98
|
+
.#{$prefix}-icon,
|
|
99
|
+
.#{$module}-item-title {
|
|
100
|
+
color: $color-steps_success-text-hover;
|
|
101
|
+
}
|
|
83
102
|
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
103
|
|
|
87
|
-
|
|
104
|
+
&:active {
|
|
105
|
+
background-color: $color-steps-bg-active;
|
|
88
106
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
107
|
+
.#{$prefix}-icon,
|
|
108
|
+
.#{$module}-item-title {
|
|
109
|
+
color: $color-steps_success-text-active;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
92
112
|
}
|
|
93
113
|
|
|
94
|
-
|
|
95
|
-
background: $color-steps-bg-hover;
|
|
114
|
+
&-error {
|
|
96
115
|
|
|
97
116
|
.#{$prefix}-icon,
|
|
98
117
|
.#{$module}-item-title {
|
|
99
|
-
color: $color-steps_danger-text-
|
|
118
|
+
color: $color-steps_danger-text-default;
|
|
100
119
|
}
|
|
101
|
-
}
|
|
102
120
|
|
|
103
|
-
|
|
104
|
-
|
|
121
|
+
&-hover:hover {
|
|
122
|
+
background: $color-steps-bg-hover;
|
|
105
123
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
124
|
+
.#{$prefix}-icon,
|
|
125
|
+
.#{$module}-item-title {
|
|
126
|
+
color: $color-steps_danger-text-hover;
|
|
127
|
+
}
|
|
109
128
|
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
129
|
|
|
113
|
-
|
|
130
|
+
&:active {
|
|
131
|
+
background-color: $color-steps-bg-active;
|
|
114
132
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
133
|
+
.#{$prefix}-icon,
|
|
134
|
+
.#{$module}-item-title {
|
|
135
|
+
color: $color-steps_danger-text-active;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
118
138
|
}
|
|
119
139
|
|
|
120
|
-
|
|
121
|
-
background: $color-steps-bg-hover;
|
|
140
|
+
&-warning {
|
|
122
141
|
|
|
123
142
|
.#{$module}-item-title,
|
|
124
143
|
.#{$prefix}-icon {
|
|
125
|
-
color: $color-steps_warning-text-
|
|
144
|
+
color: $color-steps_warning-text-default;
|
|
126
145
|
}
|
|
127
|
-
}
|
|
128
146
|
|
|
129
|
-
|
|
130
|
-
|
|
147
|
+
&-hover:hover {
|
|
148
|
+
background: $color-steps-bg-hover;
|
|
131
149
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
150
|
+
.#{$module}-item-title,
|
|
151
|
+
.#{$prefix}-icon {
|
|
152
|
+
color: $color-steps_warning-text-hover;
|
|
153
|
+
}
|
|
135
154
|
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
155
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
height: $height-steps_item_left;
|
|
148
|
-
line-height: $font-steps_item_left-lineHeight;
|
|
149
|
-
text-align: center;
|
|
150
|
-
border-radius: $radius-steps_item_left;
|
|
151
|
-
display: flex;
|
|
152
|
-
align-items: center;
|
|
153
|
-
justify-content: center;
|
|
154
|
-
@include font-size-header-4;
|
|
155
|
-
font-weight: $font-weight-bold;
|
|
156
|
-
flex-grow: 0;
|
|
157
|
-
|
|
158
|
-
&.#{$module}-item-plain {
|
|
159
|
-
color: $color-steps-text-default;
|
|
156
|
+
&:active {
|
|
157
|
+
background-color: $color-steps-bg-active;
|
|
158
|
+
|
|
159
|
+
.#{$module}-item-title,
|
|
160
|
+
.#{$prefix}-icon {
|
|
161
|
+
color: $color-steps_warning-text-active;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
160
164
|
}
|
|
161
165
|
|
|
162
|
-
&-
|
|
163
|
-
|
|
166
|
+
&-clickable {
|
|
167
|
+
cursor: pointer;
|
|
164
168
|
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
169
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
170
|
+
&-left {
|
|
171
|
+
width: $width-steps_item_left;
|
|
172
|
+
height: $height-steps_item_left;
|
|
173
|
+
line-height: $font-steps_item_left-lineHeight;
|
|
174
|
+
text-align: center;
|
|
175
|
+
border-radius: $radius-steps_item_left;
|
|
176
|
+
display: flex;
|
|
177
|
+
align-items: center;
|
|
178
|
+
justify-content: center;
|
|
179
|
+
@include font-size-header-4;
|
|
180
|
+
font-weight: $font-weight-bold;
|
|
181
|
+
flex-grow: 0;
|
|
175
182
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.#{$prefix}-row-flex {
|
|
182
|
-
column-gap: $spacing-steps_item-marginRight;
|
|
183
|
-
}
|
|
183
|
+
&.#{$module}-item-plain {
|
|
184
|
+
color: $color-steps-text-default;
|
|
185
|
+
}
|
|
184
186
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
&-process {
|
|
188
|
+
background: $color-steps_process-bg-default;
|
|
189
|
+
}
|
|
188
190
|
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.#{$module}-item {
|
|
192
|
-
@include steps-item;
|
|
193
|
-
@include steps-item-left;
|
|
194
|
-
@include steps-item-content;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
191
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.#{$module}-item {
|
|
206
|
-
@include steps-item-left;
|
|
207
|
-
@include steps-item-content;
|
|
192
|
+
&-content {
|
|
193
|
+
margin-left: $spacing-steps_item_content-marginLeft;
|
|
194
|
+
flex: 1;
|
|
195
|
+
overflow: hidden;
|
|
196
|
+
}
|
|
208
197
|
}
|
|
209
198
|
}
|
package/steps/navSteps.scss
CHANGED
|
@@ -1,84 +1,63 @@
|
|
|
1
1
|
$module: #{$prefix}-steps;
|
|
2
2
|
$item: #{$module}-item;
|
|
3
3
|
$basicType: #{$module}-nav;
|
|
4
|
-
$navItem: #{$item}-nav;
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
.#{$basicType} {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
flex-flow: row nowrap;
|
|
8
|
+
|
|
9
|
+
.#{$item} {
|
|
10
|
+
@include box-sizing;
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
&:last-child {
|
|
13
|
+
flex: none;
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
.#{$item}-content {
|
|
16
|
+
width: auto;
|
|
17
|
+
}
|
|
14
18
|
}
|
|
15
|
-
}
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
.#{$item}-container {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
color: $color-steps_nav_item_container-text;
|
|
24
|
+
|
|
25
|
+
.#{$item}-icon {
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
flex: 1;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
color: $color-steps_nav_item-icon;
|
|
30
|
+
min-width: $width-steps_nav_item_icon-minWidth;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
21
33
|
|
|
22
|
-
.#{$item}-
|
|
23
|
-
display: inline-flex;
|
|
34
|
+
.#{$item}-content {
|
|
24
35
|
flex: 1;
|
|
25
|
-
|
|
26
|
-
color: $color-steps_nav_item-icon;
|
|
27
|
-
min-width: $width-steps_nav_item_icon-minWidth;
|
|
36
|
+
display: inline-block;
|
|
28
37
|
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.#{$item}-content {
|
|
32
|
-
flex: 1;
|
|
33
|
-
display: inline-block;
|
|
34
|
-
}
|
|
35
38
|
|
|
36
|
-
.#{$item}-title {
|
|
37
|
-
@include font-size-header-6;
|
|
38
|
-
max-width: $width-steps_nav_item_title-maxWidth;
|
|
39
|
-
@include text-overflow-hidden;
|
|
40
|
-
font-weight: $font-steps_nav_item_title-fontWeight;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
&-active {
|
|
45
39
|
.#{$item}-title {
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
@include font-size-header-6;
|
|
41
|
+
max-width: $width-steps_nav_item_title-maxWidth;
|
|
42
|
+
@include text-overflow-hidden;
|
|
43
|
+
font-weight: $font-steps_nav_item_title-fontWeight;
|
|
48
44
|
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@mixin steps-nav-small {
|
|
53
|
-
.#{$item}-title {
|
|
54
|
-
@include font-size-regular;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
45
|
|
|
58
|
-
.#{$basicType} {
|
|
59
|
-
display: inline-flex;
|
|
60
|
-
flex-flow: row nowrap;
|
|
61
46
|
|
|
62
|
-
|
|
63
|
-
|
|
47
|
+
&-active {
|
|
48
|
+
.#{$item}-title {
|
|
49
|
+
color: $color-steps_nav_item_title-text-active;
|
|
50
|
+
font-weight: $font-steps_nav_item_title_active-fontWeight;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
64
53
|
}
|
|
65
54
|
|
|
66
55
|
&.#{$module}-small {
|
|
67
56
|
.#{$item} {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
57
|
+
.#{$item}-title {
|
|
58
|
+
@include font-size-regular;
|
|
59
|
+
}
|
|
72
60
|
|
|
73
|
-
|
|
74
|
-
// The following css is used for variant generation in C2D
|
|
75
|
-
.#{$navItem} {
|
|
76
|
-
&.#{$item} {
|
|
77
|
-
@include steps-nav-item;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&.#{$item}-small {
|
|
81
|
-
@include steps-nav-small;
|
|
61
|
+
}
|
|
82
62
|
}
|
|
83
|
-
|
|
84
63
|
}
|
package/table/foundation.ts
CHANGED
|
@@ -58,7 +58,8 @@ export interface BaseColumnProps<RecordType> {
|
|
|
58
58
|
sorter?: BaseSorter<RecordType>;
|
|
59
59
|
title?: any;
|
|
60
60
|
useFullRender?: boolean;
|
|
61
|
-
width?: string | number
|
|
61
|
+
width?: string | number;
|
|
62
|
+
ellipsis?: BaseEllipsis
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
export interface TableAdapter<RecordType> extends DefaultAdapter {
|
|
@@ -103,7 +104,8 @@ export interface TableAdapter<RecordType> extends DefaultAdapter {
|
|
|
103
104
|
getNormalizeColumns: () => (columns: BaseColumnProps<RecordType>[], children: any) => BaseColumnProps<RecordType>[];
|
|
104
105
|
getHandleColumns: () => (queries: BaseColumnProps<RecordType>[], cachedColumns: BaseColumnProps<RecordType>[]) => BaseColumnProps<RecordType>[];
|
|
105
106
|
getMergePagination: () => (pagination: BasePagination) => BasePagination;
|
|
106
|
-
setBodyHasScrollbar: (bodyHasScrollBar: boolean) => void
|
|
107
|
+
setBodyHasScrollbar: (bodyHasScrollBar: boolean) => void;
|
|
108
|
+
getTableLayout: () => 'fixed' | 'auto'
|
|
107
109
|
}
|
|
108
110
|
|
|
109
111
|
class TableFoundation<RecordType> extends BaseFoundation<TableAdapter<RecordType>> {
|
|
@@ -1257,4 +1259,6 @@ export interface BaseChangeInfoSorter<RecordType> {
|
|
|
1257
1259
|
|
|
1258
1260
|
export type BaseIncludeGroupRecord<RecordType> = RecordType | { groupKey: string };
|
|
1259
1261
|
|
|
1262
|
+
export type BaseEllipsis = boolean | { showTitle: boolean };
|
|
1263
|
+
|
|
1260
1264
|
export default TableFoundation;
|
package/table/table.scss
CHANGED
|
@@ -83,6 +83,11 @@ $module: #{$prefix}-table;
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
&-operate-wrapper {
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: flex-start;
|
|
89
|
+
}
|
|
90
|
+
|
|
86
91
|
&-body {
|
|
87
92
|
overflow: auto;
|
|
88
93
|
width: 100%;
|
|
@@ -115,8 +120,9 @@ $module: #{$prefix}-table;
|
|
|
115
120
|
padding-top: $spacing-table_row_head-paddingY;
|
|
116
121
|
padding-bottom: $spacing-table_row_head-paddingY;
|
|
117
122
|
vertical-align: middle;
|
|
118
|
-
|
|
119
|
-
word-
|
|
123
|
+
overflow-wrap: break-word;
|
|
124
|
+
// word-break: break-all;
|
|
125
|
+
// word-wrap: break-word;
|
|
120
126
|
position: relative;
|
|
121
127
|
|
|
122
128
|
&.#{$module}-cell-fixed {
|
|
@@ -177,6 +183,14 @@ $module: #{$prefix}-table;
|
|
|
177
183
|
display: inline-flex;
|
|
178
184
|
align-items: center;
|
|
179
185
|
}
|
|
186
|
+
|
|
187
|
+
&-ellipsis {
|
|
188
|
+
@include text-overflow-hidden;
|
|
189
|
+
|
|
190
|
+
.#{$module}-row-head-title {
|
|
191
|
+
@include text-overflow-hidden;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
180
194
|
}
|
|
181
195
|
|
|
182
196
|
.react-resizable {
|
|
@@ -241,8 +255,9 @@ $module: #{$prefix}-table;
|
|
|
241
255
|
|
|
242
256
|
& > .#{$module}-row-cell {
|
|
243
257
|
display: table-cell;
|
|
244
|
-
|
|
245
|
-
word-
|
|
258
|
+
overflow-wrap: break-word;
|
|
259
|
+
// word-wrap: break-word;
|
|
260
|
+
// word-break: break-all;
|
|
246
261
|
border-left: none;
|
|
247
262
|
border-right: none;
|
|
248
263
|
border-bottom: $width-table_base_border $border-table_base-borderStyle $color-table-border-default;
|
|
@@ -254,6 +269,10 @@ $module: #{$prefix}-table;
|
|
|
254
269
|
&.resizing {
|
|
255
270
|
border-right: $width-table_resizer_border solid $color-table_resizer-bg-default;
|
|
256
271
|
}
|
|
272
|
+
|
|
273
|
+
&-ellipsis {
|
|
274
|
+
@include text-overflow-hidden;
|
|
275
|
+
}
|
|
257
276
|
}
|
|
258
277
|
&.#{$module}-row {
|
|
259
278
|
&-expand {
|
|
@@ -401,9 +420,10 @@ $module: #{$prefix}-table;
|
|
|
401
420
|
text-align: center;
|
|
402
421
|
|
|
403
422
|
&-wrapper {
|
|
404
|
-
display:
|
|
423
|
+
display: flex;
|
|
405
424
|
align-items: center;
|
|
406
425
|
cursor: pointer;
|
|
426
|
+
overflow: hidden;
|
|
407
427
|
}
|
|
408
428
|
|
|
409
429
|
&-up,
|
package/table/utils.ts
CHANGED
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
import { strings, numbers } from './constants';
|
|
19
19
|
import isNullOrUndefined from '../utils/isNullOrUndefined';
|
|
20
20
|
import Logger from '../utils/Logger';
|
|
21
|
+
import type { BaseEllipsis } from './foundation';
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
export function equalWith(value: any, other: any, customizer?: (...args: any[]) => boolean) {
|
|
@@ -479,4 +480,9 @@ export function getRTLAlign(align: typeof strings.ALIGNS[number], direction?: 'l
|
|
|
479
480
|
}
|
|
480
481
|
}
|
|
481
482
|
return align;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
export function shouldShowEllipsisTitle(ellipsis: BaseEllipsis) {
|
|
486
|
+
const shouldShowTitle = ellipsis === true || get(ellipsis, 'showTitle', true);
|
|
487
|
+
return shouldShowTitle;
|
|
482
488
|
}
|
package/timePicker/foundation.ts
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
transformToArray,
|
|
11
11
|
isTimeFormatLike
|
|
12
12
|
} from './utils';
|
|
13
|
-
import { split } from 'lodash';
|
|
13
|
+
import { split, isUndefined } from 'lodash';
|
|
14
14
|
import { isValid, format, getHours } from 'date-fns';
|
|
15
15
|
import { utcToZonedTime, zonedTimeToUtc } from '../utils/date-fns-extra';
|
|
16
16
|
import isNullOrUndefined from '../utils/isNullOrUndefined';
|
|
@@ -182,7 +182,7 @@ class TimePickerFoundation<P = Record<string, any>, S = Record<string, any>> ext
|
|
|
182
182
|
isAM[index] = panelIsAM;
|
|
183
183
|
const inputValue = this.formatValue(value);
|
|
184
184
|
|
|
185
|
-
if (this.getState('isAM')[index] !== result.isAM){
|
|
185
|
+
if (this.getState('isAM')[index] !== result.isAM) {
|
|
186
186
|
this.setState({ isAM } as any);
|
|
187
187
|
}
|
|
188
188
|
if (!this._isControlledComponent('value')) {
|
|
@@ -369,7 +369,16 @@ class TimePickerFoundation<P = Record<string, any>, S = Record<string, any>> ext
|
|
|
369
369
|
}
|
|
370
370
|
|
|
371
371
|
if (_dates && Array.isArray(_dates)) {
|
|
372
|
-
|
|
372
|
+
const result = _dates.map(date => {
|
|
373
|
+
let str;
|
|
374
|
+
if (isUndefined(date)) {
|
|
375
|
+
str = '';
|
|
376
|
+
} else {
|
|
377
|
+
str = formatToString(date, validFormat, dateFnsLocale);
|
|
378
|
+
}
|
|
379
|
+
return str;
|
|
380
|
+
});
|
|
381
|
+
return result.join(rangeSeparator);
|
|
373
382
|
}
|
|
374
383
|
return undefined;
|
|
375
384
|
}
|