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