@douyinfe/semi-foundation 2.1.0-beta.1 → 2.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cascader/foundation.ts +1 -1
- package/lib/es/cascader/foundation.d.ts +1 -1
- package/lib/es/popconfirm/popconfirmFoundation.d.ts +0 -2
- package/lib/es/popconfirm/popconfirmFoundation.js +0 -4
- package/lib/es/select/foundation.js +5 -10
- package/lib/es/tabs/foundation.d.ts +0 -3
- package/lib/es/tabs/foundation.js +8 -4
- package/lib/es/tabs/tabs.css +1 -13
- package/lib/es/tabs/tabs.scss +76 -96
- package/lib/es/tagInput/foundation.d.ts +0 -1
- package/lib/es/tagInput/foundation.js +0 -2
- package/lib/es/tooltip/foundation.js +2 -5
- package/lib/es/tree/foundation.d.ts +1 -1
- package/lib/es/tree/treeUtil.js +7 -10
- package/lib/es/treeSelect/foundation.d.ts +11 -10
- package/package.json +3 -3
- package/popconfirm/popconfirmFoundation.ts +0 -5
- package/select/foundation.ts +5 -6
- package/tabs/foundation.ts +8 -7
- package/tabs/tabs.scss +76 -96
- package/tagInput/foundation.ts +0 -2
- package/tooltip/foundation.ts +2 -4
- package/tree/foundation.ts +1 -1
- package/tree/treeUtil.ts +1 -1
- package/treeSelect/foundation.ts +9 -10
package/cascader/foundation.ts
CHANGED
|
@@ -77,7 +77,7 @@ export interface BasicTriggerRenderProps {
|
|
|
77
77
|
/** The hierarchical position of the selected node in treeData,
|
|
78
78
|
* as in the following example, when Zhejiang-Hangzhou-Xiaoshan
|
|
79
79
|
* District is selected, the value here is 0-0-1 */
|
|
80
|
-
value?: string
|
|
80
|
+
value?: string;
|
|
81
81
|
/* The input value of the current input box */
|
|
82
82
|
inputValue: string;
|
|
83
83
|
/* Cascader's placeholder */
|
|
@@ -40,7 +40,7 @@ export interface BasicTriggerRenderProps {
|
|
|
40
40
|
/** The hierarchical position of the selected node in treeData,
|
|
41
41
|
* as in the following example, when Zhejiang-Hangzhou-Xiaoshan
|
|
42
42
|
* District is selected, the value here is 0-0-1 */
|
|
43
|
-
value?: string
|
|
43
|
+
value?: string;
|
|
44
44
|
inputValue: string;
|
|
45
45
|
placeholder?: string;
|
|
46
46
|
/** The function used to update the value of the input box. You
|
|
@@ -4,13 +4,11 @@ export interface PopconfirmAdapter<P = Record<string, any>, S = Record<string, a
|
|
|
4
4
|
notifyConfirm: (e: any) => void;
|
|
5
5
|
notifyCancel: (e: any) => void;
|
|
6
6
|
notifyVisibleChange: (visible: boolean) => void;
|
|
7
|
-
notifyClickOutSide: (e: any) => void;
|
|
8
7
|
}
|
|
9
8
|
export default class PopConfirmFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<PopconfirmAdapter<P, S>, P, S> {
|
|
10
9
|
init(): void;
|
|
11
10
|
destroy(): void;
|
|
12
11
|
handleCancel(e: any): void;
|
|
13
12
|
handleConfirm(e: any): void;
|
|
14
|
-
handleClickOutSide(e: any): void;
|
|
15
13
|
handleVisibleChange(visible: boolean): void;
|
|
16
14
|
}
|
|
@@ -17,10 +17,6 @@ export default class PopConfirmFoundation extends BaseFoundation {
|
|
|
17
17
|
this.handleVisibleChange(false);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
handleClickOutSide(e) {
|
|
21
|
-
this._adapter.notifyClickOutSide(e);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
20
|
handleVisibleChange(visible) {
|
|
25
21
|
if (!this._isControlledComponent('visible')) {
|
|
26
22
|
this._adapter.setVisible(visible);
|
|
@@ -29,7 +29,7 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
29
29
|
|
|
30
30
|
import BaseFoundation from '../base/foundation';
|
|
31
31
|
import KeyCode from '../utils/keyCode';
|
|
32
|
-
import { isNumber, isString, isEqual
|
|
32
|
+
import { isNumber, isString, isEqual } from 'lodash-es';
|
|
33
33
|
import warning from '../utils/warning';
|
|
34
34
|
import isNullOrUndefined from '../utils/isNullOrUndefined';
|
|
35
35
|
export default class SelectFoundation extends BaseFoundation {
|
|
@@ -266,14 +266,12 @@ export default class SelectFoundation extends BaseFoundation {
|
|
|
266
266
|
let optionNotExist = {
|
|
267
267
|
value: propValue,
|
|
268
268
|
label: propValue,
|
|
269
|
-
_notExist: true
|
|
270
|
-
_scrollIndex: -1
|
|
269
|
+
_notExist: true
|
|
271
270
|
};
|
|
272
271
|
|
|
273
272
|
if (onChangeWithObject) {
|
|
274
273
|
optionNotExist = _Object$assign(_Object$assign({}, propValue), {
|
|
275
|
-
_notExist: true
|
|
276
|
-
_scrollIndex: -1
|
|
274
|
+
_notExist: true
|
|
277
275
|
});
|
|
278
276
|
}
|
|
279
277
|
|
|
@@ -332,9 +330,7 @@ export default class SelectFoundation extends BaseFoundation {
|
|
|
332
330
|
onChangeWithObject ? optionNotExist = _Object$assign(_Object$assign({}, propValue[i]), {
|
|
333
331
|
_notExist: true
|
|
334
332
|
}) : null;
|
|
335
|
-
selections.set(optionNotExist.label,
|
|
336
|
-
_scrollIndex: -1
|
|
337
|
-
}));
|
|
333
|
+
selections.set(optionNotExist.label, optionNotExist);
|
|
338
334
|
}
|
|
339
335
|
}
|
|
340
336
|
});
|
|
@@ -519,7 +515,7 @@ export default class SelectFoundation extends BaseFoundation {
|
|
|
519
515
|
this._adapter.notifyMaxLimit(_Object$assign({
|
|
520
516
|
value,
|
|
521
517
|
label
|
|
522
|
-
},
|
|
518
|
+
}, rest));
|
|
523
519
|
|
|
524
520
|
return;
|
|
525
521
|
} else {
|
|
@@ -1020,7 +1016,6 @@ export default class SelectFoundation extends BaseFoundation {
|
|
|
1020
1016
|
delete option._parentGroup;
|
|
1021
1017
|
delete option._show;
|
|
1022
1018
|
delete option._selected;
|
|
1023
|
-
delete option._scrollIndex;
|
|
1024
1019
|
|
|
1025
1020
|
if ('_keyInOptionList' in option) {
|
|
1026
1021
|
option.key = option._keyInOptionList;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import BaseFoundation, { DefaultAdapter } from '../base/foundation';
|
|
2
2
|
export interface TabsAdapter<P = Record<string, any>, S = Record<string, any>> extends DefaultAdapter<P, S> {
|
|
3
3
|
collectPane: () => void;
|
|
4
|
-
collectActiveKey: () => void;
|
|
5
4
|
notifyTabClick: (activeKey: string, event: any) => void;
|
|
6
5
|
notifyChange: (activeKey: string) => void;
|
|
7
6
|
setNewActiveKey: (activeKey: string) => void;
|
|
8
7
|
getDefaultActiveKeyFromChildren: () => string;
|
|
9
|
-
notifyTabDelete: (tabKey: string) => void;
|
|
10
8
|
}
|
|
11
9
|
declare class TabsFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<TabsAdapter<P, S>, P, S> {
|
|
12
10
|
constructor(adapter: TabsAdapter<P, S>);
|
|
@@ -18,6 +16,5 @@ declare class TabsFoundation<P = Record<string, any>, S = Record<string, any>> e
|
|
|
18
16
|
getDefaultActiveKey(): string;
|
|
19
17
|
handleTabListChange(): void;
|
|
20
18
|
handleTabPanesChange(): void;
|
|
21
|
-
handleTabDelete(tabKey: string): void;
|
|
22
19
|
}
|
|
23
20
|
export default TabsFoundation;
|
|
@@ -68,11 +68,15 @@ class TabsFoundation extends BaseFoundation {
|
|
|
68
68
|
handleTabPanesChange() {
|
|
69
69
|
this._adapter.collectPane();
|
|
70
70
|
|
|
71
|
-
this.
|
|
72
|
-
|
|
71
|
+
let activeKey = this.getState('activeKey');
|
|
72
|
+
|
|
73
|
+
if (typeof activeKey === 'undefined') {
|
|
74
|
+
activeKey = this._adapter.getDefaultActiveKeyFromChildren();
|
|
75
|
+
}
|
|
73
76
|
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
if (typeof activeKey !== 'undefined') {
|
|
78
|
+
this.handleNewActiveKey(activeKey);
|
|
79
|
+
}
|
|
76
80
|
}
|
|
77
81
|
|
|
78
82
|
}
|
package/lib/es/tabs/tabs.css
CHANGED
|
@@ -40,13 +40,6 @@
|
|
|
40
40
|
top: 3px;
|
|
41
41
|
color: var(--semi-color-text-2);
|
|
42
42
|
}
|
|
43
|
-
.semi-tabs-bar .semi-tabs-tab .semi-icon-close {
|
|
44
|
-
margin-right: 0;
|
|
45
|
-
font-size: 14px;
|
|
46
|
-
color: var(--semi-color-text-2);
|
|
47
|
-
margin-left: 10px;
|
|
48
|
-
cursor: pointer;
|
|
49
|
-
}
|
|
50
43
|
.semi-tabs-bar .semi-tabs-tab:hover {
|
|
51
44
|
color: var(--semi-color-text-0);
|
|
52
45
|
}
|
|
@@ -60,6 +53,7 @@
|
|
|
60
53
|
color: var(--semi-color-text-0);
|
|
61
54
|
}
|
|
62
55
|
.semi-tabs-bar .semi-tabs-tab-active, .semi-tabs-bar .semi-tabs-tab-active:hover {
|
|
56
|
+
color: var(--semi-color-text-0);
|
|
63
57
|
cursor: default;
|
|
64
58
|
font-weight: 600;
|
|
65
59
|
color: var(--semi-color-text-0);
|
|
@@ -67,12 +61,6 @@
|
|
|
67
61
|
.semi-tabs-bar .semi-tabs-tab-active .semi-icon, .semi-tabs-bar .semi-tabs-tab-active:hover .semi-icon {
|
|
68
62
|
color: var(--semi-color-primary);
|
|
69
63
|
}
|
|
70
|
-
.semi-tabs-bar .semi-tabs-tab-active .semi-icon-close, .semi-tabs-bar .semi-tabs-tab-active:hover .semi-icon-close {
|
|
71
|
-
color: var(--semi-color-text-2);
|
|
72
|
-
}
|
|
73
|
-
.semi-tabs-bar .semi-tabs-tab-active .semi-icon-close:hover {
|
|
74
|
-
color: var(--semi-color-text-1);
|
|
75
|
-
}
|
|
76
64
|
.semi-tabs-bar .semi-tabs-tab-disabled {
|
|
77
65
|
cursor: not-allowed;
|
|
78
66
|
color: var(--semi-color-disabled-text);
|
package/lib/es/tabs/tabs.scss
CHANGED
|
@@ -6,26 +6,26 @@ $module: #{$prefix}-tabs;
|
|
|
6
6
|
.#{$module} {
|
|
7
7
|
box-sizing: border-box;
|
|
8
8
|
position: relative;
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
&-left {
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: row;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
&-bar {
|
|
16
16
|
position: relative;
|
|
17
17
|
white-space: nowrap;
|
|
18
18
|
outline: none;
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
&-left {
|
|
21
21
|
display: flex;
|
|
22
22
|
flex-direction: column;
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
&-extra {
|
|
26
26
|
padding: $spacing-tabs_bar_extra-paddingY $spacing-tabs_bar_extra-paddingX;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
.#{$module}-tab {
|
|
30
30
|
@include font-size-regular;
|
|
31
31
|
cursor: pointer;
|
|
@@ -33,92 +33,76 @@ $module: #{$prefix}-tabs;
|
|
|
33
33
|
position: relative;
|
|
34
34
|
display: block;
|
|
35
35
|
float: left;
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
font-weight: $font-tabs_tab-fontWeight;
|
|
38
38
|
color: $color-tabs_tab_line_default-text-default;
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
user-select: none;
|
|
41
|
-
|
|
41
|
+
|
|
42
42
|
.#{$prefix}-icon {
|
|
43
43
|
position: relative;
|
|
44
44
|
margin-right: $spacing-tabs_tab_icon-marginRight;
|
|
45
45
|
top: $spacing-tabs_tab_icon-top;
|
|
46
46
|
color: $color-tabs_tab-icon-default;
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
.#{$prefix}-icon-close {
|
|
50
|
-
margin-right: 0;
|
|
51
|
-
font-size: 14px;
|
|
52
|
-
color: var(--semi-color-text-2);
|
|
53
|
-
margin-left: 10px;
|
|
54
|
-
cursor: pointer;
|
|
55
|
-
}
|
|
56
|
-
|
|
48
|
+
|
|
57
49
|
&:hover {
|
|
58
50
|
color: $color-tabs_tab_line_default-text-hover;
|
|
59
|
-
|
|
51
|
+
|
|
60
52
|
.#{$prefix}-icon {
|
|
61
53
|
color: $color-tabs_tab-icon-hover;
|
|
62
54
|
}
|
|
63
55
|
}
|
|
64
|
-
|
|
56
|
+
|
|
65
57
|
&:active {
|
|
66
58
|
color: $color-tabs_tab_line_default-text-active;
|
|
67
|
-
|
|
59
|
+
|
|
68
60
|
.#{$prefix}-icon {
|
|
69
61
|
color: $color-tabs_tab-icon-active;
|
|
70
62
|
}
|
|
71
63
|
}
|
|
72
64
|
}
|
|
73
|
-
|
|
65
|
+
|
|
74
66
|
.#{$module}-tab-active {
|
|
75
|
-
|
|
67
|
+
|
|
76
68
|
&,
|
|
77
69
|
&:hover {
|
|
70
|
+
color: $color-tabs_tab_line_selected-text-default;
|
|
78
71
|
cursor: default;
|
|
79
72
|
// border-bottom: 2px solid $color-tabs_tab_line_indicator_selected-icon-default;
|
|
80
73
|
font-weight: $font-tabs_tab_active-fontWeight;
|
|
81
74
|
color: $color-tabs_tab_line_selected-text-default;
|
|
82
|
-
|
|
75
|
+
|
|
83
76
|
.#{$prefix}-icon {
|
|
84
77
|
color: $color-tabs_tab_selected-icon-default;
|
|
85
78
|
}
|
|
86
|
-
|
|
87
|
-
.#{$prefix}-icon-close {
|
|
88
|
-
color: var(--semi-color-text-2);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.#{$prefix}-icon-close:hover {
|
|
93
|
-
color: var(--semi-color-text-1);
|
|
94
79
|
}
|
|
95
80
|
}
|
|
96
|
-
|
|
81
|
+
|
|
97
82
|
.#{$module}-tab-disabled {
|
|
98
83
|
cursor: not-allowed;
|
|
99
84
|
color: $color-tabs_tab_line_disabled-text-default;
|
|
100
|
-
|
|
85
|
+
|
|
101
86
|
&:hover {
|
|
102
87
|
color: $color-tabs_tab_line_disabled-text-hover;
|
|
103
88
|
border-bottom: none;
|
|
104
89
|
}
|
|
105
90
|
}
|
|
106
91
|
}
|
|
107
|
-
|
|
92
|
+
|
|
108
93
|
&-bar-collapse {
|
|
109
94
|
&,
|
|
110
95
|
.#{$module}-bar-overflow-list {
|
|
111
96
|
display: flex;
|
|
112
97
|
align-items: center;
|
|
113
98
|
}
|
|
114
|
-
|
|
99
|
+
|
|
115
100
|
.#{$prefix}-overflow-list {
|
|
116
101
|
flex: 1;
|
|
117
|
-
|
|
118
102
|
.#{$prefix}-overflow-list-scroll-wrapper {
|
|
119
103
|
-ms-overflow-style: none; /* Internet Explorer 10+ */
|
|
120
104
|
scrollbar-width: none; /* Firefox */
|
|
121
|
-
|
|
105
|
+
|
|
122
106
|
&::-webkit-scrollbar {
|
|
123
107
|
display: none; /* Safari and Chrome */
|
|
124
108
|
width: 0;
|
|
@@ -126,100 +110,98 @@ $module: #{$prefix}-tabs;
|
|
|
126
110
|
}
|
|
127
111
|
}
|
|
128
112
|
}
|
|
129
|
-
|
|
113
|
+
|
|
130
114
|
.#{$module}-bar-arrow-start {
|
|
131
115
|
margin-right: $spacing-tabs_overflow_icon-marginRight;
|
|
132
116
|
}
|
|
133
|
-
|
|
117
|
+
|
|
134
118
|
.#{$module}-bar-arrow-end {
|
|
135
119
|
margin-left: $spacing-tabs_overflow_icon-marginLeft;
|
|
136
120
|
}
|
|
137
121
|
}
|
|
138
|
-
|
|
122
|
+
|
|
139
123
|
&-bar-dropdown {
|
|
140
124
|
max-height: $height-tabs_overflow_list;
|
|
141
125
|
overflow-y: auto;
|
|
142
126
|
}
|
|
143
|
-
|
|
127
|
+
|
|
144
128
|
&-bar:after {
|
|
145
129
|
content: "";
|
|
146
130
|
height: 0;
|
|
147
131
|
display: block;
|
|
148
132
|
clear: both;
|
|
149
133
|
}
|
|
150
|
-
|
|
134
|
+
|
|
151
135
|
&-bar-line {
|
|
152
136
|
&.#{$module}-bar-top {
|
|
153
137
|
border-bottom: $width-tabs_bar_line-border solid $color-tabs_tab_line_default-border-default;
|
|
154
|
-
|
|
138
|
+
|
|
155
139
|
.#{$module}-tab {
|
|
156
140
|
padding: $spacing-tabs_bar_line_tab-paddingTop $spacing-tabs_bar_line_tab-paddingRight $spacing-tabs_bar_line_tab-paddingBottom $spacing-tabs_bar_line_tab-paddingLeft;
|
|
157
|
-
|
|
158
|
-
&:nth-of-type(1) {
|
|
141
|
+
&:nth-of-type(1){
|
|
159
142
|
padding-left: 0;
|
|
160
143
|
}
|
|
161
|
-
|
|
162
144
|
border-bottom: $width-tabs_bar_line_tab-border solid transparent;
|
|
163
|
-
|
|
145
|
+
|
|
164
146
|
&:hover {
|
|
165
147
|
border-bottom: $width-tabs_bar_line_tab-border solid $color-tabs_tab_line_default-border-hover;
|
|
166
148
|
}
|
|
167
|
-
|
|
149
|
+
|
|
168
150
|
&:active {
|
|
169
151
|
border-bottom: $width-tabs_bar_line_tab-border solid $color-tabs_tab_line_default-border-active;
|
|
170
152
|
}
|
|
171
|
-
|
|
153
|
+
|
|
172
154
|
&:not(:last-of-type) {
|
|
173
155
|
margin-right: $spacing-tabs_bar_line_tab-marginRight;
|
|
174
156
|
}
|
|
175
|
-
|
|
157
|
+
|
|
176
158
|
&-small {
|
|
177
159
|
padding: $spacing-tabs_bar_line_tab_small-paddingTop $spacing-tabs_bar_line_tab_small-paddingRight $spacing-tabs_bar_line_tab_small-paddingBottom $spacing-tabs_bar_line_tab_small-paddingLeft;
|
|
178
160
|
}
|
|
179
|
-
|
|
161
|
+
|
|
180
162
|
&-medium {
|
|
181
163
|
padding: $spacing-tabs_bar_line_tab_medium-paddingTop $spacing-tabs_bar_line_tab_medium-paddingRight $spacing-tabs_bar_line_tab_medium-paddingBottom $spacing-tabs_bar_line_tab_medium-paddingLeft;
|
|
182
164
|
}
|
|
183
165
|
}
|
|
184
|
-
|
|
166
|
+
|
|
185
167
|
.#{$module}-tab-active {
|
|
186
|
-
|
|
168
|
+
|
|
187
169
|
&,
|
|
188
170
|
&:hover {
|
|
189
171
|
border-bottom: $width-tabs_bar_line_tab-border solid $color-tabs_tab_line_indicator_selected-icon-default;
|
|
190
172
|
}
|
|
191
173
|
}
|
|
192
174
|
}
|
|
193
|
-
|
|
175
|
+
|
|
194
176
|
&.#{$module}-bar-left {
|
|
195
177
|
border-right: $width-tabs_bar_line-border solid $color-tabs_tab_line_default-border-default;
|
|
196
|
-
|
|
178
|
+
|
|
197
179
|
.#{$module}-tab {
|
|
198
180
|
padding: $spacing-tabs_bar_line_tab_left-padding;
|
|
199
181
|
border-left: $width-tabs_bar_line_tab-border solid transparent;
|
|
200
|
-
|
|
182
|
+
|
|
201
183
|
&:hover {
|
|
202
184
|
border-left: $width-tabs_bar_line_tab-border solid $color-tabs_tab_line_default-border-hover;
|
|
203
185
|
background-color: $color-tabs_tab_line_vertical-bg-hover;
|
|
204
186
|
}
|
|
205
|
-
|
|
187
|
+
|
|
206
188
|
&:active {
|
|
207
189
|
border-left: $width-tabs_bar_line_tab-border solid $color-tabs_tab_line_default-border-active;
|
|
208
190
|
background-color: $color-tabs_tab_line_vertical-bg-active;
|
|
209
191
|
}
|
|
210
|
-
|
|
192
|
+
|
|
211
193
|
&-small {
|
|
212
194
|
padding: $spacing-tabs_bar_line_tab_left_small-padding;
|
|
213
195
|
}
|
|
214
|
-
|
|
196
|
+
|
|
215
197
|
&-medium {
|
|
216
198
|
padding: $spacing-tabs_bar_line_tab_left_medium-padding;
|
|
217
199
|
}
|
|
218
200
|
}
|
|
219
|
-
|
|
201
|
+
|
|
220
202
|
.#{$module}-tab-active {
|
|
221
203
|
background-color: $color-tabs_tab_line_vertical_selected-bg-default;
|
|
222
|
-
|
|
204
|
+
|
|
223
205
|
&,
|
|
224
206
|
&:hover {
|
|
225
207
|
border-left: $width-tabs_bar_line_tab-border solid $color-tabs_tab_line_indicator_selected-icon-default;
|
|
@@ -227,49 +209,47 @@ $module: #{$prefix}-tabs;
|
|
|
227
209
|
}
|
|
228
210
|
}
|
|
229
211
|
}
|
|
230
|
-
|
|
212
|
+
|
|
231
213
|
// type='bar' extar need specific
|
|
232
214
|
.#{$module}-bar-extra {
|
|
233
215
|
height: $height-tabs_bar_extra_large;
|
|
234
216
|
line-height: $font-tabs_bar_extra_large-lineHeight;
|
|
235
217
|
}
|
|
236
|
-
|
|
237
218
|
.#{$module}-bar-line-extra-small {
|
|
238
219
|
height: $height-tabs_bar_extra_small;
|
|
239
220
|
line-height: $font-tabs_bar_extra_small-lineHeight;
|
|
240
221
|
}
|
|
241
222
|
}
|
|
242
|
-
|
|
223
|
+
|
|
243
224
|
&-bar-card {
|
|
244
225
|
&.#{$module}-bar-top {
|
|
245
|
-
|
|
226
|
+
|
|
246
227
|
&::before {
|
|
247
228
|
position: absolute;
|
|
248
229
|
right: 0;
|
|
249
230
|
left: 0;
|
|
250
231
|
bottom: 0;
|
|
251
232
|
border-bottom: $width-tabs_bar_card-border solid $color-tabs_tab_card_default-border-default;
|
|
252
|
-
content:
|
|
233
|
+
content: '';
|
|
253
234
|
}
|
|
254
|
-
|
|
255
235
|
// border-bottom: $border-thickness-control solid $color-tabs_tab_line_default-border-default;
|
|
256
|
-
|
|
236
|
+
|
|
257
237
|
.#{$module}-tab {
|
|
258
238
|
border: $width-tabs_bar_card-border solid transparent;
|
|
259
239
|
border-bottom: none;
|
|
260
240
|
border-radius: $radius-tabs_tab_card;
|
|
261
|
-
|
|
241
|
+
|
|
262
242
|
&:hover {
|
|
263
243
|
border-bottom: none;
|
|
264
244
|
}
|
|
265
|
-
|
|
245
|
+
|
|
266
246
|
&:not(:last-of-type) {
|
|
267
247
|
margin-right: $spacing-tabs_bar_card_tab-marginRight;
|
|
268
248
|
}
|
|
269
249
|
}
|
|
270
|
-
|
|
250
|
+
|
|
271
251
|
.#{$module}-tab-active {
|
|
272
|
-
|
|
252
|
+
|
|
273
253
|
&,
|
|
274
254
|
&:hover {
|
|
275
255
|
padding: $spacing-tabs_bar_card_tab_active-paddingTop $spacing-tabs_bar_card_tab_active-paddingRight $spacing-tabs_bar_card_tab_active-paddingBottom $spacing-tabs_bar_card_tab_active-paddingLeft;
|
|
@@ -280,26 +260,26 @@ $module: #{$prefix}-tabs;
|
|
|
280
260
|
}
|
|
281
261
|
}
|
|
282
262
|
}
|
|
283
|
-
|
|
263
|
+
|
|
284
264
|
&.#{$module}-bar-left {
|
|
285
265
|
border-right: $width-tabs_bar_card-border solid $color-tabs_tab_line_default-border-default;
|
|
286
|
-
|
|
266
|
+
|
|
287
267
|
.#{$module}-tab {
|
|
288
268
|
border: $width-tabs_bar_card-border solid transparent;
|
|
289
269
|
border-right: none;
|
|
290
270
|
border-radius: $radius-tabs_tab_card_left;
|
|
291
|
-
|
|
271
|
+
|
|
292
272
|
&:hover {
|
|
293
273
|
border-right: none;
|
|
294
274
|
}
|
|
295
|
-
|
|
275
|
+
|
|
296
276
|
&:not(:last-of-type) {
|
|
297
277
|
margin-bottom: $spacing-tabs_bar_card_tab_left-marginBottom;
|
|
298
278
|
}
|
|
299
279
|
}
|
|
300
|
-
|
|
280
|
+
|
|
301
281
|
.#{$module}-tab-active {
|
|
302
|
-
|
|
282
|
+
|
|
303
283
|
&:after {
|
|
304
284
|
content: " ";
|
|
305
285
|
width: 1px;
|
|
@@ -309,7 +289,7 @@ $module: #{$prefix}-tabs;
|
|
|
309
289
|
bottom: 0;
|
|
310
290
|
background: $color-tabs_tab_card_selected-bg-default;
|
|
311
291
|
}
|
|
312
|
-
|
|
292
|
+
|
|
313
293
|
&,
|
|
314
294
|
&:hover {
|
|
315
295
|
padding: $spacing-tabs_bar_card_tab_left_active-paddingY $spacing-tabs_bar_card_tab_left_active-paddingX;
|
|
@@ -320,59 +300,59 @@ $module: #{$prefix}-tabs;
|
|
|
320
300
|
}
|
|
321
301
|
}
|
|
322
302
|
}
|
|
323
|
-
|
|
303
|
+
|
|
324
304
|
.#{$module}-tab {
|
|
325
305
|
padding: $spacing-tabs_bar_card_tab-paddingY $spacing-tabs_bar_card_tab-paddingX;
|
|
326
|
-
|
|
306
|
+
|
|
327
307
|
&:hover {
|
|
328
308
|
background: $color-tabs_tab_card-bg-hover;
|
|
329
309
|
}
|
|
330
|
-
|
|
310
|
+
|
|
331
311
|
&:active {
|
|
332
312
|
background: $color-tabs_tab_card-bg-active;
|
|
333
313
|
}
|
|
334
314
|
}
|
|
335
315
|
}
|
|
336
|
-
|
|
316
|
+
|
|
337
317
|
&-bar-button {
|
|
338
318
|
border: none;
|
|
339
|
-
|
|
319
|
+
|
|
340
320
|
&.#{$module}-bar-left {
|
|
341
321
|
.#{$module}-tab {
|
|
342
|
-
|
|
322
|
+
|
|
343
323
|
&:not(:last-of-type) {
|
|
344
324
|
margin-bottom: $spacing-tabs_bar_button_tab_left-marginBottom;
|
|
345
325
|
}
|
|
346
326
|
}
|
|
347
327
|
}
|
|
348
|
-
|
|
328
|
+
|
|
349
329
|
&.#{$module}-bar-top {
|
|
350
330
|
.#{$module}-tab {
|
|
351
|
-
|
|
331
|
+
|
|
352
332
|
&:not(:last-of-type) {
|
|
353
333
|
margin-right: $spacing-tabs_bar_button_tab-marginRight;
|
|
354
334
|
}
|
|
355
335
|
}
|
|
356
336
|
}
|
|
357
|
-
|
|
337
|
+
|
|
358
338
|
.#{$module}-tab {
|
|
359
339
|
padding: $spacing-tabs_bar_button_tab-paddingY $spacing-tabs_bar_button_tab-paddingX;
|
|
360
340
|
border-radius: $radius-tabs_tab_button;
|
|
361
341
|
color: $color-tabs_tab_button-text-default;
|
|
362
342
|
border: none;
|
|
363
|
-
|
|
343
|
+
|
|
364
344
|
&:hover {
|
|
365
345
|
border: none;
|
|
366
346
|
background-color: $color-tabs_tab_button-bg-hover;
|
|
367
347
|
}
|
|
368
|
-
|
|
348
|
+
|
|
369
349
|
&:active {
|
|
370
350
|
background-color: $color-tabs_tab_button-bg-active;
|
|
371
351
|
}
|
|
372
352
|
}
|
|
373
|
-
|
|
353
|
+
|
|
374
354
|
.#{$module}-tab-active {
|
|
375
|
-
|
|
355
|
+
|
|
376
356
|
&,
|
|
377
357
|
&:hover {
|
|
378
358
|
color: $color-tabs_tab_button_selected-text-default;
|
|
@@ -381,19 +361,19 @@ $module: #{$prefix}-tabs;
|
|
|
381
361
|
}
|
|
382
362
|
}
|
|
383
363
|
}
|
|
384
|
-
|
|
364
|
+
|
|
385
365
|
&-content {
|
|
386
366
|
width: 100%;
|
|
387
367
|
padding: $spacing-tabs_content-paddingY $spacing-tabs_content-paddingX;
|
|
388
368
|
// overflow: hidden;
|
|
389
369
|
// display: flex;
|
|
390
370
|
}
|
|
391
|
-
|
|
371
|
+
|
|
392
372
|
&-content-left {
|
|
393
373
|
height: 100%;
|
|
394
374
|
padding: $spacing-tabs_content_left-paddingY $spacing-tabs_content_left-paddingX;
|
|
395
375
|
}
|
|
396
|
-
|
|
376
|
+
|
|
397
377
|
&-pane {
|
|
398
378
|
width: 100%;
|
|
399
379
|
overflow: hidden;
|
|
@@ -401,7 +381,7 @@ $module: #{$prefix}-tabs;
|
|
|
401
381
|
// flex-shrink: 0;
|
|
402
382
|
// position: absolute;
|
|
403
383
|
}
|
|
404
|
-
|
|
384
|
+
|
|
405
385
|
&-pane-inactive,
|
|
406
386
|
&-content-no-animated &-pane-inactive {
|
|
407
387
|
display: none;
|
|
@@ -14,7 +14,6 @@ export interface TagInputAdapter extends DefaultAdapter {
|
|
|
14
14
|
notifyTagChange: (v: string[]) => void;
|
|
15
15
|
notifyTagAdd: (v: string[]) => void;
|
|
16
16
|
notifyTagRemove: (v: string, idx: number) => void;
|
|
17
|
-
notifyKeyDown: (e: TagInputMouseEvent) => void;
|
|
18
17
|
}
|
|
19
18
|
declare class TagInputFoundation extends BaseFoundation<TagInputAdapter> {
|
|
20
19
|
constructor(adapter: TagInputAdapter);
|
|
@@ -77,9 +77,6 @@ export default class Tooltip extends BaseFoundation {
|
|
|
77
77
|
this._adapter.insertPortal(content, position);
|
|
78
78
|
|
|
79
79
|
if (trigger === 'custom') {
|
|
80
|
-
// eslint-disable-next-line
|
|
81
|
-
this._adapter.registerClickOutsideHandler(() => {});
|
|
82
|
-
|
|
83
80
|
this._togglePortalVisible(true);
|
|
84
81
|
}
|
|
85
82
|
/**
|
|
@@ -202,12 +199,12 @@ export default class Tooltip extends BaseFoundation {
|
|
|
202
199
|
}
|
|
203
200
|
|
|
204
201
|
_bindEvent() {
|
|
205
|
-
const
|
|
202
|
+
const types = this.getProp('trigger'); // get trigger type
|
|
206
203
|
|
|
207
204
|
const {
|
|
208
205
|
triggerEventSet,
|
|
209
206
|
portalEventSet
|
|
210
|
-
} = this._generateEvent(
|
|
207
|
+
} = this._generateEvent(types);
|
|
211
208
|
|
|
212
209
|
this._bindTriggerEvent(triggerEventSet);
|
|
213
210
|
|