@douyinfe/semi-foundation 2.0.9-alpha.2 → 2.1.0-alpha.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/calendar/foundation.ts +1 -1
- package/cascader/foundation.ts +1 -1
- package/collapse/foundation.ts +1 -1
- package/lib/es/anchor/foundation.js +12 -20
- package/lib/es/backtop/foundation.js +3 -5
- package/lib/es/base/foundation.js +2 -7
- package/lib/es/calendar/eventUtil.js +3 -9
- package/lib/es/cascader/foundation.d.ts +1 -1
- package/lib/es/cascader/foundation.js +4 -8
- package/lib/es/collapse/foundation.d.ts +1 -1
- package/lib/es/datePicker/_utils/formatter.js +5 -7
- package/lib/es/datePicker/_utils/getDayOfWeek.js +3 -4
- package/lib/es/datePicker/_utils/getMonthTable.js +2 -6
- package/lib/es/datePicker/_utils/isBetween.js +4 -5
- package/lib/es/datePicker/_utils/isWithinInterval.js +4 -5
- package/lib/es/datePicker/foundation.js +16 -46
- package/lib/es/datePicker/monthsGridFoundation.js +7 -15
- package/lib/es/form/foundation.js +8 -14
- package/lib/es/form/utils.js +2 -4
- package/lib/es/input/util/calculateNodeHeight.js +1 -4
- package/lib/es/inputNumber/foundation.js +5 -18
- package/lib/es/navigation/NavItem.js +1 -3
- package/lib/es/navigation/foundation.js +6 -25
- package/lib/es/navigation/subNavFoundation.js +2 -12
- package/lib/es/overflowList/foundation.js +3 -6
- package/lib/es/pagination/foundation.js +1 -5
- package/lib/es/popconfirm/popconfirmFoundation.d.ts +2 -0
- package/lib/es/popconfirm/popconfirmFoundation.js +4 -0
- package/lib/es/scrollList/itemFoundation.js +2 -4
- package/lib/es/scrollList/scrollTo.js +3 -4
- package/lib/es/select/foundation.js +11 -7
- package/lib/es/sideSheet/sideSheetFoundation.js +8 -11
- package/lib/es/slider/foundation.js +4 -11
- package/lib/es/table/bodyFoundation.js +1 -5
- package/lib/es/table/foundation.js +13 -29
- package/lib/es/table/utils.js +24 -64
- 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/timePicker/ComboxFoundation.js +1 -2
- package/lib/es/timePicker/foundation.js +11 -20
- package/lib/es/timePicker/utils/index.js +5 -16
- package/lib/es/timePicker/utils/localeDate.js +2 -8
- package/lib/es/timeline/timeline.css +1 -0
- package/lib/es/timeline/timeline.scss +1 -0
- package/lib/es/timeline/variables.scss +1 -0
- package/lib/es/tooltip/foundation.js +19 -26
- package/lib/es/tree/foundation.d.ts +1 -1
- package/lib/es/tree/foundation.js +2 -4
- package/lib/es/tree/treeUtil.d.ts +1 -1
- package/lib/es/tree/treeUtil.js +19 -29
- package/lib/es/treeSelect/foundation.d.ts +10 -11
- package/lib/es/treeSelect/foundation.js +1 -2
- package/lib/es/upload/constants.d.ts +1 -1
- package/lib/es/upload/foundation.js +27 -32
- package/lib/es/utils/Event.js +4 -11
- package/lib/es/utils/Logger.js +5 -27
- package/lib/es/utils/array.js +1 -3
- package/lib/es/utils/classnames.js +2 -12
- package/lib/es/utils/dom.js +2 -10
- package/lib/es/utils/getHighlight.js +19 -24
- package/lib/es/utils/log.js +1 -5
- package/lib/es/utils/object.js +2 -5
- package/lib/es/utils/touchPolyfill.js +1 -3
- 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/timeline/timeline.scss +1 -0
- package/timeline/variables.scss +1 -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/lib/es/utils/log.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { get } from 'lodash-es';
|
|
2
2
|
|
|
3
|
-
const log =
|
|
3
|
+
const log = (text, ...rest) => {
|
|
4
4
|
if (get(process, 'env.NODE_ENV') === 'development') {
|
|
5
|
-
for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
6
|
-
rest[_key - 1] = arguments[_key];
|
|
7
|
-
}
|
|
8
|
-
|
|
9
5
|
console.log(text, ...rest);
|
|
10
6
|
}
|
|
11
7
|
};
|
package/lib/es/utils/object.js
CHANGED
|
@@ -44,9 +44,7 @@ function isEmptyObject(target) {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
function cleanup(obj, path) {
|
|
48
|
-
let pull = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
49
|
-
|
|
47
|
+
function cleanup(obj, path, pull = true) {
|
|
50
48
|
if (path.length === 0) {
|
|
51
49
|
return;
|
|
52
50
|
}
|
|
@@ -126,8 +124,7 @@ export function forwardStatics(obj, srcObj) {
|
|
|
126
124
|
if (obj && (typeof obj === 'function' || typeof obj === 'object') && srcObj && (typeof srcObj === 'function' || typeof srcObj === 'object')) {
|
|
127
125
|
var _context;
|
|
128
126
|
|
|
129
|
-
_forEachInstanceProperty(_context = _Object$entries(srcObj)).call(_context,
|
|
130
|
-
let [key, value] = _ref;
|
|
127
|
+
_forEachInstanceProperty(_context = _Object$entries(srcObj)).call(_context, ([key, value]) => {
|
|
131
128
|
obj[key] = value;
|
|
132
129
|
});
|
|
133
130
|
}
|
|
@@ -18,9 +18,7 @@ const touchEventPolyfill = (touch, touchEvent) => {
|
|
|
18
18
|
if (value) {
|
|
19
19
|
if (typeof value === 'function') {
|
|
20
20
|
// bind 'this' for function of touchEvent running in Touch Point Object
|
|
21
|
-
value =
|
|
22
|
-
return touchEvent[key](...arguments);
|
|
23
|
-
};
|
|
21
|
+
value = (...args) => touchEvent[key](...args);
|
|
24
22
|
}
|
|
25
23
|
|
|
26
24
|
if (touch[key]) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0-alpha.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:lib": "node ./scripts/compileLib.js",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@babel/runtime-corejs3": "^7.15.4",
|
|
11
|
-
"@douyinfe/semi-animation": "2.0.
|
|
11
|
+
"@douyinfe/semi-animation": "2.1.0-alpha.2",
|
|
12
12
|
"async-validator": "^3.5.0",
|
|
13
13
|
"classnames": "^2.2.6",
|
|
14
14
|
"date-fns": "^2.9.0",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"*.scss",
|
|
25
25
|
"*.css"
|
|
26
26
|
],
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "50381484f8df8aaa00285cf0a2ee01edf0083115",
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
30
30
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
@@ -7,6 +7,7 @@ export interface PopconfirmAdapter<P = Record<string, any>, S = Record<string, a
|
|
|
7
7
|
notifyConfirm: (e: any) => void;
|
|
8
8
|
notifyCancel: (e: any) => void;
|
|
9
9
|
notifyVisibleChange: (visible: boolean) => void;
|
|
10
|
+
notifyClickOutSide: (e: any) => void;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
export default class PopConfirmFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<PopconfirmAdapter<P, S>, P, S> {
|
|
@@ -25,6 +26,10 @@ export default class PopConfirmFoundation<P = Record<string, any>, S = Record<st
|
|
|
25
26
|
this.handleVisibleChange(false);
|
|
26
27
|
}
|
|
27
28
|
|
|
29
|
+
handleClickOutSide(e: any): void {
|
|
30
|
+
this._adapter.notifyClickOutSide(e);
|
|
31
|
+
}
|
|
32
|
+
|
|
28
33
|
handleVisibleChange(visible: boolean): void {
|
|
29
34
|
if (!this._isControlledComponent('visible')) {
|
|
30
35
|
this._adapter.setVisible(visible);
|
package/select/foundation.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable max-len */
|
|
3
3
|
import BaseFoundation, { DefaultAdapter } from '../base/foundation';
|
|
4
4
|
import KeyCode from '../utils/keyCode';
|
|
5
|
-
import { isNumber, isString, isEqual } from 'lodash-es';
|
|
5
|
+
import { isNumber, isString, isEqual, omit } from 'lodash-es';
|
|
6
6
|
import warning from '../utils/warning';
|
|
7
7
|
import isNullOrUndefined from '../utils/isNullOrUndefined';
|
|
8
8
|
import { BasicOptionProps } from './optionFoundation';
|
|
@@ -231,9 +231,9 @@ export default class SelectFoundation extends BaseFoundation<SelectAdapter> {
|
|
|
231
231
|
selections.set(optionExist.label, optionExist);
|
|
232
232
|
} else if (noMatchOptionInList) {
|
|
233
233
|
// If the current value does not have a corresponding item in the optionList, construct an option and update it to the selection. However, it does not need to be inserted into the list
|
|
234
|
-
let optionNotExist = { value: propValue, label: propValue, _notExist: true };
|
|
234
|
+
let optionNotExist = { value: propValue, label: propValue, _notExist: true, _scrollIndex: -1 } as BasicOptionProps;
|
|
235
235
|
if (onChangeWithObject) {
|
|
236
|
-
optionNotExist = { ...propValue as BasicOptionProps, _notExist: true
|
|
236
|
+
optionNotExist = { ...propValue as BasicOptionProps, _notExist: true, _scrollIndex: -1 };
|
|
237
237
|
}
|
|
238
238
|
selections.set(optionNotExist.label, optionNotExist);
|
|
239
239
|
}
|
|
@@ -278,7 +278,7 @@ export default class SelectFoundation extends BaseFoundation<SelectAdapter> {
|
|
|
278
278
|
// The current value does not exist in the current optionList or the list before the change. Construct an option and update it to the selection
|
|
279
279
|
let optionNotExist = { value: selectedValue, label: selectedValue, _notExist: true };
|
|
280
280
|
onChangeWithObject ? (optionNotExist = { ...propValue[i] as any, _notExist: true }) : null;
|
|
281
|
-
selections.set(optionNotExist.label, optionNotExist);
|
|
281
|
+
selections.set(optionNotExist.label, { ...optionNotExist, _scrollIndex: -1 });
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
});
|
|
@@ -410,7 +410,7 @@ export default class SelectFoundation extends BaseFoundation<SelectAdapter> {
|
|
|
410
410
|
this._notifyDeselect(value, { value, label, ...rest });
|
|
411
411
|
selections.delete(label);
|
|
412
412
|
} else if (maxLimit && selections.size === maxLimit) {
|
|
413
|
-
this._adapter.notifyMaxLimit({ value, label, ...rest });
|
|
413
|
+
this._adapter.notifyMaxLimit({ value, label, ...omit(rest, '_scrollIndex') });
|
|
414
414
|
return;
|
|
415
415
|
} else {
|
|
416
416
|
this._notifySelect(value, { value, label, ...rest });
|
|
@@ -788,6 +788,7 @@ export default class SelectFoundation extends BaseFoundation<SelectAdapter> {
|
|
|
788
788
|
delete option._parentGroup;
|
|
789
789
|
delete option._show;
|
|
790
790
|
delete option._selected;
|
|
791
|
+
delete option._scrollIndex;
|
|
791
792
|
if ('_keyInOptionList' in option) {
|
|
792
793
|
option.key = option._keyInOptionList;
|
|
793
794
|
delete option._keyInOptionList;
|
package/tabs/foundation.ts
CHANGED
|
@@ -3,10 +3,12 @@ import { noop } from 'lodash-es';
|
|
|
3
3
|
|
|
4
4
|
export interface TabsAdapter<P = Record<string, any>, S = Record<string, any>> extends DefaultAdapter<P, S> {
|
|
5
5
|
collectPane: () => void;
|
|
6
|
+
collectActiveKey: () => void;
|
|
6
7
|
notifyTabClick: (activeKey: string, event: any) => void;
|
|
7
8
|
notifyChange: (activeKey: string) => void;
|
|
8
9
|
setNewActiveKey: (activeKey: string) => void;
|
|
9
10
|
getDefaultActiveKeyFromChildren: () => string;
|
|
11
|
+
notifyTabDelete: (tabKey: string) => void;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
class TabsFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<TabsAdapter<P, S>, P, S> {
|
|
@@ -64,15 +66,12 @@ class TabsFoundation<P = Record<string, any>, S = Record<string, any>> extends B
|
|
|
64
66
|
|
|
65
67
|
handleTabPanesChange(): void {
|
|
66
68
|
this._adapter.collectPane();
|
|
69
|
+
this._adapter.collectActiveKey();
|
|
70
|
+
}
|
|
67
71
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
activeKey = this._adapter.getDefaultActiveKeyFromChildren();
|
|
71
|
-
}
|
|
72
|
-
if (typeof activeKey !== 'undefined') {
|
|
73
|
-
this.handleNewActiveKey(activeKey);
|
|
74
|
-
}
|
|
72
|
+
handleTabDelete(tabKey: string): void {
|
|
73
|
+
this._adapter.notifyTabDelete(tabKey);
|
|
75
74
|
}
|
|
76
75
|
}
|
|
77
76
|
|
|
78
|
-
export default TabsFoundation;
|
|
77
|
+
export default TabsFoundation;
|
package/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;
|
package/tagInput/foundation.ts
CHANGED
|
@@ -24,6 +24,7 @@ export interface TagInputAdapter extends DefaultAdapter {
|
|
|
24
24
|
notifyTagChange: (v: string[]) => void;
|
|
25
25
|
notifyTagAdd: (v: string[]) => void;
|
|
26
26
|
notifyTagRemove: (v: string, idx: number) => void;
|
|
27
|
+
notifyKeyDown: (e: TagInputMouseEvent) => void;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
class TagInputFoundation extends BaseFoundation<TagInputAdapter> {
|
|
@@ -90,6 +91,7 @@ class TagInputFoundation extends BaseFoundation<TagInputAdapter> {
|
|
|
90
91
|
const removedTag = tagsArray[length - 1];
|
|
91
92
|
this._onRemove(newTagList, removedTag, length - 1);
|
|
92
93
|
}
|
|
94
|
+
this._adapter.notifyKeyDown(e);
|
|
93
95
|
};
|
|
94
96
|
|
|
95
97
|
_handleAddTags(e: TagInputChangeEvent) {
|
package/timeline/timeline.scss
CHANGED
package/timeline/variables.scss
CHANGED
|
@@ -6,6 +6,7 @@ $color-timeline_dot_info-bg-default: var(--semi-color-tertiary-light-active); //
|
|
|
6
6
|
$color-timeline_tail-border: var(--semi-color-text-3); // 时间轴连线颜色
|
|
7
7
|
$color-timeline_time_default-text-default: var(--semi-color-text-2); // 时间轴文字颜色 - 默认
|
|
8
8
|
$color-timeline_item_head-bg: transparent; // 时间轴头部背景颜色
|
|
9
|
+
$color-timeline_item_content-text-default: var(--semi-color-text-0); // 时间轴标题文字颜色
|
|
9
10
|
|
|
10
11
|
$spacing-timeline-margin: $spacing-none; // 时间轴整体外边距
|
|
11
12
|
$spacing-timeline-padding: $spacing-tight; // 时间轴整体内边距
|