@douyinfe/semi-foundation 2.67.2-alpha.0 → 2.67.2-alpha.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/lib/cjs/select/foundation.js +1 -7
- package/lib/cjs/select/select.css +1 -0
- package/lib/cjs/select/select.scss +3 -1
- package/lib/cjs/select/variables.scss +3 -0
- package/lib/cjs/tree/treeUtil.d.ts +1 -1
- package/lib/cjs/upload/constants.d.ts +1 -1
- package/lib/es/select/foundation.js +1 -7
- package/lib/es/select/select.css +1 -0
- package/lib/es/select/select.scss +3 -1
- package/lib/es/select/variables.scss +3 -0
- package/lib/es/tree/treeUtil.d.ts +1 -1
- package/lib/es/upload/constants.d.ts +1 -1
- package/package.json +3 -3
- package/select/foundation.ts +1 -5
- package/select/select.scss +3 -1
- package/select/variables.scss +3 -0
|
@@ -378,16 +378,9 @@ class SelectFoundation extends _foundation.default {
|
|
|
378
378
|
closeCb,
|
|
379
379
|
notToggleInput
|
|
380
380
|
} = closeConfig || {};
|
|
381
|
-
const {
|
|
382
|
-
isFocus
|
|
383
|
-
} = this.getStates();
|
|
384
381
|
this._adapter.closeMenu();
|
|
385
382
|
this._adapter.notifyDropdownVisibleChange(false);
|
|
386
383
|
this._adapter.setIsFocusInContainer(false);
|
|
387
|
-
if (isFocus) {
|
|
388
|
-
// if the isFocus state is true, refocus the trigger case see in https://github.com/DouyinFE/semi-design/issues/2465
|
|
389
|
-
this._focusTrigger();
|
|
390
|
-
}
|
|
391
384
|
// this.unBindKeyBoardEvent();
|
|
392
385
|
// this._notifyBlur(e);
|
|
393
386
|
// this._adapter.updateFocusState(false);
|
|
@@ -418,6 +411,7 @@ class SelectFoundation extends _foundation.default {
|
|
|
418
411
|
const isMultiple = this._isMultiple();
|
|
419
412
|
if (!isMultiple) {
|
|
420
413
|
this._handleSingleSelect(option, event);
|
|
414
|
+
this._focusTrigger();
|
|
421
415
|
} else {
|
|
422
416
|
this._handleMultipleSelect(option, event);
|
|
423
417
|
}
|
|
@@ -37,6 +37,7 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
37
37
|
&:focus {
|
|
38
38
|
border: $width-select-border-focus solid $color-select-border-focus;
|
|
39
39
|
background-color: $color-select-bg-focus;
|
|
40
|
+
// background-color: plum;
|
|
40
41
|
outline: 0;
|
|
41
42
|
}
|
|
42
43
|
|
|
@@ -125,7 +126,8 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
125
126
|
|
|
126
127
|
&:focus {
|
|
127
128
|
// when select is disabled, the border should not have active color
|
|
128
|
-
border: $width-select-border-focus solid
|
|
129
|
+
border: $width-select-border-focus solid $color-select_input_disabled-border-focus;
|
|
130
|
+
background-color: $color-select_input_disabled-bg-focus;
|
|
129
131
|
}
|
|
130
132
|
|
|
131
133
|
.#{$module}-selection,
|
|
@@ -37,8 +37,11 @@ $color-select_clearBtn-text-hover: var(--semi-color-primary); // 选择器输入
|
|
|
37
37
|
$color-select_input-bg-default: transparent; // 选择器输入框清空按钮颜色 - 悬停态
|
|
38
38
|
$color-select_input_disabled-bg: var(--semi-color-disabled-fill); // 禁用选择器输入框背景色
|
|
39
39
|
$color-select_input_disabled-border: var(--semi-color-border); // 禁用选择器输入框描边颜色
|
|
40
|
+
$color-select_input_disabled-border-focus: transparent; // 禁用选择器输入框描边颜色 - 聚焦态
|
|
40
41
|
$color-select_input_disabled-text: var(--semi-color-disabled-text); // 禁用选择器输入框回填内容文字颜色
|
|
41
42
|
$color-select_input_disabled-bg-hover: var(--semi-color-disabled-fill); // 选择器输入框回填内容文字颜色 - 悬停态
|
|
43
|
+
$color-select_input_disabled-bg-focus: var(--semi-color-disabled-fill); // 选择器输入框回填内容文字颜色 - 聚焦态
|
|
44
|
+
|
|
42
45
|
$color-select_input_placeholder-text: var(--semi-color-text-2); // 选择器输入框占位文本文字颜色
|
|
43
46
|
|
|
44
47
|
$color-select_option_main-text: var(--semi-color-text-0); // 选择器菜单选项文本颜色
|
|
@@ -83,6 +83,6 @@ export declare function getValueOrKey(data: any, keyMaps?: KeyMapProps): any;
|
|
|
83
83
|
export declare function normalizeValue(value: any, withObject: boolean, keyMaps?: KeyMapProps): any;
|
|
84
84
|
export declare function updateKeys(keySet: Set<string> | string[], keyEntities: KeyEntities): string[];
|
|
85
85
|
export declare function calcDisabledKeys(keyEntities: KeyEntities, keyMaps?: KeyMapProps): Set<string>;
|
|
86
|
-
export declare function calcDropRelativePosition(event: any, treeNode: any):
|
|
86
|
+
export declare function calcDropRelativePosition(event: any, treeNode: any): 1 | -1 | 0;
|
|
87
87
|
export declare function getDragNodesKeys(key: string, keyEntities: KeyEntities): string[];
|
|
88
88
|
export declare function calcDropActualPosition(pos: string, relativeDropPos: any): any;
|
|
@@ -18,7 +18,7 @@ declare const strings: {
|
|
|
18
18
|
DRAG_AREA_ILLEGAL: string;
|
|
19
19
|
TRIGGER_AUTO: "auto";
|
|
20
20
|
TRIGGER_CUSTOM: "custom";
|
|
21
|
-
UPLOAD_TRIGGER: ("
|
|
21
|
+
UPLOAD_TRIGGER: ("auto" | "custom")[];
|
|
22
22
|
VALIDATE_STATUS: readonly ["default", "error", "warning", "success"];
|
|
23
23
|
PROMPT_POSITION: readonly ["left", "right", "bottom"];
|
|
24
24
|
};
|
|
@@ -369,16 +369,9 @@ export default class SelectFoundation extends BaseFoundation {
|
|
|
369
369
|
closeCb,
|
|
370
370
|
notToggleInput
|
|
371
371
|
} = closeConfig || {};
|
|
372
|
-
const {
|
|
373
|
-
isFocus
|
|
374
|
-
} = this.getStates();
|
|
375
372
|
this._adapter.closeMenu();
|
|
376
373
|
this._adapter.notifyDropdownVisibleChange(false);
|
|
377
374
|
this._adapter.setIsFocusInContainer(false);
|
|
378
|
-
if (isFocus) {
|
|
379
|
-
// if the isFocus state is true, refocus the trigger case see in https://github.com/DouyinFE/semi-design/issues/2465
|
|
380
|
-
this._focusTrigger();
|
|
381
|
-
}
|
|
382
375
|
// this.unBindKeyBoardEvent();
|
|
383
376
|
// this._notifyBlur(e);
|
|
384
377
|
// this._adapter.updateFocusState(false);
|
|
@@ -409,6 +402,7 @@ export default class SelectFoundation extends BaseFoundation {
|
|
|
409
402
|
const isMultiple = this._isMultiple();
|
|
410
403
|
if (!isMultiple) {
|
|
411
404
|
this._handleSingleSelect(option, event);
|
|
405
|
+
this._focusTrigger();
|
|
412
406
|
} else {
|
|
413
407
|
this._handleMultipleSelect(option, event);
|
|
414
408
|
}
|
package/lib/es/select/select.css
CHANGED
|
@@ -37,6 +37,7 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
37
37
|
&:focus {
|
|
38
38
|
border: $width-select-border-focus solid $color-select-border-focus;
|
|
39
39
|
background-color: $color-select-bg-focus;
|
|
40
|
+
// background-color: plum;
|
|
40
41
|
outline: 0;
|
|
41
42
|
}
|
|
42
43
|
|
|
@@ -125,7 +126,8 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
125
126
|
|
|
126
127
|
&:focus {
|
|
127
128
|
// when select is disabled, the border should not have active color
|
|
128
|
-
border: $width-select-border-focus solid
|
|
129
|
+
border: $width-select-border-focus solid $color-select_input_disabled-border-focus;
|
|
130
|
+
background-color: $color-select_input_disabled-bg-focus;
|
|
129
131
|
}
|
|
130
132
|
|
|
131
133
|
.#{$module}-selection,
|
|
@@ -37,8 +37,11 @@ $color-select_clearBtn-text-hover: var(--semi-color-primary); // 选择器输入
|
|
|
37
37
|
$color-select_input-bg-default: transparent; // 选择器输入框清空按钮颜色 - 悬停态
|
|
38
38
|
$color-select_input_disabled-bg: var(--semi-color-disabled-fill); // 禁用选择器输入框背景色
|
|
39
39
|
$color-select_input_disabled-border: var(--semi-color-border); // 禁用选择器输入框描边颜色
|
|
40
|
+
$color-select_input_disabled-border-focus: transparent; // 禁用选择器输入框描边颜色 - 聚焦态
|
|
40
41
|
$color-select_input_disabled-text: var(--semi-color-disabled-text); // 禁用选择器输入框回填内容文字颜色
|
|
41
42
|
$color-select_input_disabled-bg-hover: var(--semi-color-disabled-fill); // 选择器输入框回填内容文字颜色 - 悬停态
|
|
43
|
+
$color-select_input_disabled-bg-focus: var(--semi-color-disabled-fill); // 选择器输入框回填内容文字颜色 - 聚焦态
|
|
44
|
+
|
|
42
45
|
$color-select_input_placeholder-text: var(--semi-color-text-2); // 选择器输入框占位文本文字颜色
|
|
43
46
|
|
|
44
47
|
$color-select_option_main-text: var(--semi-color-text-0); // 选择器菜单选项文本颜色
|
|
@@ -83,6 +83,6 @@ export declare function getValueOrKey(data: any, keyMaps?: KeyMapProps): any;
|
|
|
83
83
|
export declare function normalizeValue(value: any, withObject: boolean, keyMaps?: KeyMapProps): any;
|
|
84
84
|
export declare function updateKeys(keySet: Set<string> | string[], keyEntities: KeyEntities): string[];
|
|
85
85
|
export declare function calcDisabledKeys(keyEntities: KeyEntities, keyMaps?: KeyMapProps): Set<string>;
|
|
86
|
-
export declare function calcDropRelativePosition(event: any, treeNode: any):
|
|
86
|
+
export declare function calcDropRelativePosition(event: any, treeNode: any): 1 | -1 | 0;
|
|
87
87
|
export declare function getDragNodesKeys(key: string, keyEntities: KeyEntities): string[];
|
|
88
88
|
export declare function calcDropActualPosition(pos: string, relativeDropPos: any): any;
|
|
@@ -18,7 +18,7 @@ declare const strings: {
|
|
|
18
18
|
DRAG_AREA_ILLEGAL: string;
|
|
19
19
|
TRIGGER_AUTO: "auto";
|
|
20
20
|
TRIGGER_CUSTOM: "custom";
|
|
21
|
-
UPLOAD_TRIGGER: ("
|
|
21
|
+
UPLOAD_TRIGGER: ("auto" | "custom")[];
|
|
22
22
|
VALIDATE_STATUS: readonly ["default", "error", "warning", "success"];
|
|
23
23
|
PROMPT_POSITION: readonly ["left", "right", "bottom"];
|
|
24
24
|
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.67.2-alpha.
|
|
3
|
+
"version": "2.67.2-alpha.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:lib": "node ./scripts/compileLib.js",
|
|
7
7
|
"prepublishOnly": "npm run build:lib"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@douyinfe/semi-animation": "2.67.
|
|
10
|
+
"@douyinfe/semi-animation": "2.67.0",
|
|
11
11
|
"@mdx-js/mdx": "^3.0.1",
|
|
12
12
|
"async-validator": "^3.5.0",
|
|
13
13
|
"classnames": "^2.2.6",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"*.scss",
|
|
29
29
|
"*.css"
|
|
30
30
|
],
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "3f08368852c402daca35bf5ff4a192e841ea4dd3",
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
34
34
|
"@babel/preset-env": "^7.15.8",
|
package/select/foundation.ts
CHANGED
|
@@ -400,14 +400,9 @@ export default class SelectFoundation extends BaseFoundation<SelectAdapter> {
|
|
|
400
400
|
close(closeConfig?: { event?: any; closeCb?: () => void; notToggleInput?: boolean }) {
|
|
401
401
|
// to support A11y, closing the panel trigger does not necessarily lose focus
|
|
402
402
|
const { event, closeCb, notToggleInput } = closeConfig || {};
|
|
403
|
-
const { isFocus } = this.getStates();
|
|
404
403
|
this._adapter.closeMenu();
|
|
405
404
|
this._adapter.notifyDropdownVisibleChange(false);
|
|
406
405
|
this._adapter.setIsFocusInContainer(false);
|
|
407
|
-
if (isFocus) {
|
|
408
|
-
// if the isFocus state is true, refocus the trigger case see in https://github.com/DouyinFE/semi-design/issues/2465
|
|
409
|
-
this._focusTrigger();
|
|
410
|
-
}
|
|
411
406
|
// this.unBindKeyBoardEvent();
|
|
412
407
|
// this._notifyBlur(e);
|
|
413
408
|
// this._adapter.updateFocusState(false);
|
|
@@ -443,6 +438,7 @@ export default class SelectFoundation extends BaseFoundation<SelectAdapter> {
|
|
|
443
438
|
const isMultiple = this._isMultiple();
|
|
444
439
|
if (!isMultiple) {
|
|
445
440
|
this._handleSingleSelect(option, event);
|
|
441
|
+
this._focusTrigger();
|
|
446
442
|
} else {
|
|
447
443
|
this._handleMultipleSelect(option, event);
|
|
448
444
|
}
|
package/select/select.scss
CHANGED
|
@@ -37,6 +37,7 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
37
37
|
&:focus {
|
|
38
38
|
border: $width-select-border-focus solid $color-select-border-focus;
|
|
39
39
|
background-color: $color-select-bg-focus;
|
|
40
|
+
// background-color: plum;
|
|
40
41
|
outline: 0;
|
|
41
42
|
}
|
|
42
43
|
|
|
@@ -125,7 +126,8 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
125
126
|
|
|
126
127
|
&:focus {
|
|
127
128
|
// when select is disabled, the border should not have active color
|
|
128
|
-
border: $width-select-border-focus solid
|
|
129
|
+
border: $width-select-border-focus solid $color-select_input_disabled-border-focus;
|
|
130
|
+
background-color: $color-select_input_disabled-bg-focus;
|
|
129
131
|
}
|
|
130
132
|
|
|
131
133
|
.#{$module}-selection,
|
package/select/variables.scss
CHANGED
|
@@ -37,8 +37,11 @@ $color-select_clearBtn-text-hover: var(--semi-color-primary); // 选择器输入
|
|
|
37
37
|
$color-select_input-bg-default: transparent; // 选择器输入框清空按钮颜色 - 悬停态
|
|
38
38
|
$color-select_input_disabled-bg: var(--semi-color-disabled-fill); // 禁用选择器输入框背景色
|
|
39
39
|
$color-select_input_disabled-border: var(--semi-color-border); // 禁用选择器输入框描边颜色
|
|
40
|
+
$color-select_input_disabled-border-focus: transparent; // 禁用选择器输入框描边颜色 - 聚焦态
|
|
40
41
|
$color-select_input_disabled-text: var(--semi-color-disabled-text); // 禁用选择器输入框回填内容文字颜色
|
|
41
42
|
$color-select_input_disabled-bg-hover: var(--semi-color-disabled-fill); // 选择器输入框回填内容文字颜色 - 悬停态
|
|
43
|
+
$color-select_input_disabled-bg-focus: var(--semi-color-disabled-fill); // 选择器输入框回填内容文字颜色 - 聚焦态
|
|
44
|
+
|
|
42
45
|
$color-select_input_placeholder-text: var(--semi-color-text-2); // 选择器输入框占位文本文字颜色
|
|
43
46
|
|
|
44
47
|
$color-select_option_main-text: var(--semi-color-text-0); // 选择器菜单选项文本颜色
|