@douyinfe/semi-foundation 2.66.1 → 2.67.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/autoComplete/constants.ts +2 -3
- package/autoComplete/foundation.ts +2 -0
- package/autoComplete/option.scss +1 -1
- package/cascader/cascader.scss +0 -1
- package/cascader/rtl.scss +5 -9
- package/cascader/variables.scss +1 -2
- package/chat/chat.scss +4 -0
- package/chat/variables.scss +1 -1
- package/checkbox/checkbox.scss +2 -2
- package/form/foundation.ts +7 -2
- package/form/interface.ts +1 -0
- package/input/input.scss +2 -3
- package/lib/cjs/autoComplete/autoComplete.css +15 -15
- package/lib/cjs/autoComplete/constants.js +2 -2
- package/lib/cjs/autoComplete/foundation.d.ts +1 -0
- package/lib/cjs/autoComplete/foundation.js +1 -0
- package/lib/cjs/autoComplete/option.scss +1 -1
- package/lib/cjs/cascader/cascader.css +14 -19
- package/lib/cjs/cascader/cascader.scss +0 -1
- package/lib/cjs/cascader/rtl.scss +5 -9
- package/lib/cjs/cascader/variables.scss +1 -2
- package/lib/cjs/chat/chat.css +3 -0
- package/lib/cjs/chat/chat.scss +4 -0
- package/lib/cjs/chat/variables.scss +1 -1
- package/lib/cjs/checkbox/checkbox.css +2 -2
- package/lib/cjs/checkbox/checkbox.scss +2 -2
- package/lib/cjs/form/foundation.js +3 -1
- package/lib/cjs/form/interface.d.ts +1 -0
- package/lib/cjs/input/input.css +4 -6
- package/lib/cjs/input/input.scss +2 -3
- package/lib/cjs/pincode/foundation.js +5 -4
- package/lib/cjs/treeSelect/treeSelect.css +3 -0
- package/lib/cjs/treeSelect/treeSelect.scss +4 -0
- package/lib/cjs/upload/foundation.js +2 -0
- package/lib/es/autoComplete/autoComplete.css +15 -15
- package/lib/es/autoComplete/constants.js +2 -2
- package/lib/es/autoComplete/foundation.d.ts +1 -0
- package/lib/es/autoComplete/foundation.js +1 -0
- package/lib/es/autoComplete/option.scss +1 -1
- package/lib/es/cascader/cascader.css +14 -19
- package/lib/es/cascader/cascader.scss +0 -1
- package/lib/es/cascader/rtl.scss +5 -9
- package/lib/es/cascader/variables.scss +1 -2
- package/lib/es/chat/chat.css +3 -0
- package/lib/es/chat/chat.scss +4 -0
- package/lib/es/chat/variables.scss +1 -1
- package/lib/es/checkbox/checkbox.css +2 -2
- package/lib/es/checkbox/checkbox.scss +2 -2
- package/lib/es/form/foundation.js +3 -1
- package/lib/es/form/interface.d.ts +1 -0
- package/lib/es/input/input.css +4 -6
- package/lib/es/input/input.scss +2 -3
- package/lib/es/pincode/foundation.js +5 -4
- package/lib/es/treeSelect/treeSelect.css +3 -0
- package/lib/es/treeSelect/treeSelect.scss +4 -0
- package/lib/es/upload/foundation.js +2 -0
- package/package.json +3 -3
- package/pincode/foundation.ts +5 -4
- package/treeSelect/treeSelect.scss +4 -0
- package/upload/foundation.ts +2 -0
|
@@ -3,9 +3,8 @@ import { BASE_CLASS_PREFIX, VALIDATE_STATUS } from '../base/constants';
|
|
|
3
3
|
|
|
4
4
|
const cssClasses = {
|
|
5
5
|
PREFIX: `${BASE_CLASS_PREFIX}-autocomplete`,
|
|
6
|
-
PREFIX_OPTION: `${BASE_CLASS_PREFIX}-
|
|
7
|
-
PREFIX_GROUP: `${BASE_CLASS_PREFIX}-
|
|
8
|
-
|
|
6
|
+
PREFIX_OPTION: `${BASE_CLASS_PREFIX}-autocomplete-option`,
|
|
7
|
+
PREFIX_GROUP: `${BASE_CLASS_PREFIX}-autocomplete-group`,
|
|
9
8
|
};
|
|
10
9
|
|
|
11
10
|
const strings = {
|
|
@@ -29,6 +29,7 @@ export interface AutoCompleteAdapter<P = Record<string, any>, S = Record<string,
|
|
|
29
29
|
updateInputValue: (inputValue: string | number) => void;
|
|
30
30
|
toggleListVisible: (isShow: boolean) => void;
|
|
31
31
|
updateOptionList: (optionList: Array<StateOptionItem>) => void;
|
|
32
|
+
updateScrollTop: (index: number) => void;
|
|
32
33
|
updateSelection: (selection: Map<any, any>) => void;
|
|
33
34
|
notifySearch: (inputValue: string) => void;
|
|
34
35
|
notifyChange: (value: string | number) => void;
|
|
@@ -387,6 +388,7 @@ class AutoCompleteFoundation<P = Record<string, any>, S = Record<string, any>> e
|
|
|
387
388
|
index = nearestActiveOption;
|
|
388
389
|
}
|
|
389
390
|
this._adapter.updateFocusIndex(index);
|
|
391
|
+
this._adapter.updateScrollTop(index);
|
|
390
392
|
}
|
|
391
393
|
|
|
392
394
|
_handleArrowKeyDown(offset: number): void {
|
package/autoComplete/option.scss
CHANGED
package/cascader/cascader.scss
CHANGED
package/cascader/rtl.scss
CHANGED
|
@@ -5,12 +5,6 @@ $module: #{$prefix}-cascader;
|
|
|
5
5
|
.#{$module} {
|
|
6
6
|
direction: rtl;
|
|
7
7
|
|
|
8
|
-
&-arrow,
|
|
9
|
-
&-clearbtn {
|
|
10
|
-
margin-right: 0;
|
|
11
|
-
margin-left: $spacing-cascader_clearBtn-marginRight;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
8
|
&-inset-label {
|
|
15
9
|
margin-right: $spacing-cascader_label-marginRight;
|
|
16
10
|
margin-left: $spacing-cascader_label-marginRight;
|
|
@@ -79,12 +73,12 @@ $module: #{$prefix}-cascader;
|
|
|
79
73
|
direction: rtl;
|
|
80
74
|
}
|
|
81
75
|
|
|
82
|
-
|
|
76
|
+
&.#{$module}-option-lists-rtl ul > li {
|
|
83
77
|
padding-right: $spacing-cascader_option-paddingLeft;
|
|
84
78
|
padding-left: auto;
|
|
85
79
|
}
|
|
86
80
|
|
|
87
|
-
|
|
81
|
+
&.#{$module}-option-lists-rtl .#{$module}-option-list {
|
|
88
82
|
border-left: 0;
|
|
89
83
|
border-right: $width-cascader_option_list-border solid $color-cascader_option_list-border-default;
|
|
90
84
|
|
|
@@ -93,7 +87,7 @@ $module: #{$prefix}-cascader;
|
|
|
93
87
|
}
|
|
94
88
|
}
|
|
95
89
|
|
|
96
|
-
|
|
90
|
+
&.#{$module}-option-lists-rtl .#{$module}-option {
|
|
97
91
|
&-icon {
|
|
98
92
|
&-active,
|
|
99
93
|
&-empty {
|
|
@@ -108,6 +102,8 @@ $module: #{$prefix}-cascader;
|
|
|
108
102
|
}
|
|
109
103
|
|
|
110
104
|
.#{$prefix}-icon-chevron_right {
|
|
105
|
+
margin-left: 0;
|
|
106
|
+
margin-right: $spacing-cascader_option_icon-marginLeft;
|
|
111
107
|
transform: scaleX(-1);
|
|
112
108
|
}
|
|
113
109
|
}
|
package/cascader/variables.scss
CHANGED
|
@@ -53,7 +53,6 @@ $spacing-cascader_selection_tag-marginY: 1px; // 级联选择触发器多选时
|
|
|
53
53
|
$spacing-cascader_selection_tagInput-marginLeft: - $spacing-extra-tight; // 级联选择触发器多选搜索时 TagInput 的左外边距
|
|
54
54
|
$spacing-cascader_selection_input-marginLeft: $spacing-extra-tight; // 级联选择触发器多选搜索时输入框的左外边距
|
|
55
55
|
$spacing-cascader_selection_n-marginRight: $spacing-extra-tight; // 超出 maxTagCount 后,+n 的右外边距
|
|
56
|
-
$spacing-cascader_clearBtn-marginRight: 12px; // 级联选择触发器清空按钮右侧外边距
|
|
57
56
|
$spacing-cascader_option-icon-marginLeft: 8px; // 级联选择菜单项图标左侧外边距
|
|
58
57
|
|
|
59
58
|
$color-cascader_selection_n-text-default: var(--semi-color-text-0); // 超出 maxTagCount 后,+n 的文字默认颜色
|
|
@@ -93,7 +92,7 @@ $height-cascader_large: $height-control-large; // 级联选择触发器高度 -
|
|
|
93
92
|
$width-cascader_hover-border: $width-cascader-border; // 级联选择触发器描边宽度 - 悬浮
|
|
94
93
|
$width-cascader_focus-border: $border-thickness-control-focus; // 级联选择触发器描边宽度 - 选中态
|
|
95
94
|
$width-cascader_search-border: 1px; // 级联选择触搜索描边宽度
|
|
96
|
-
$width-cascader-icon:
|
|
95
|
+
$width-cascader-icon: 32px; // 级联选择图标尺寸
|
|
97
96
|
$width-cascader_option: 150px; // 级联选择各级菜单宽度
|
|
98
97
|
$height-cascader_option_list: 180px; // 级联选择菜单高度
|
|
99
98
|
$height-cascader_selection_tagInput_wrapper_small: 22px; //级联选择多选搜索时搜索框最小高度 - 小尺寸
|
package/chat/chat.scss
CHANGED
package/chat/variables.scss
CHANGED
|
@@ -11,7 +11,7 @@ $radius-chat_dropArea: 16px; // 拖拽上传区域圆角
|
|
|
11
11
|
//color
|
|
12
12
|
$color-chat_action_content-bg: var(--semi-color-bg-0); // 返回按钮/停止生成内容按钮背景颜色
|
|
13
13
|
$color-chat_action_content-border: var(--semi-color-border); // 返回按钮/停止生成按钮描边颜色
|
|
14
|
-
$color-chat_divider: var(--semi-color-text-2); //
|
|
14
|
+
$color-chat_divider: var(--semi-color-text-2); // 分割线文字颜色
|
|
15
15
|
$color-chat_chatBox_title: var(--semi-color-text-0); //聊天框标题颜色
|
|
16
16
|
$color-chat_chatBox_action_icon: var(--semi-color-text-2); // 聊天框操作区域按钮图标颜色
|
|
17
17
|
$color-chat_chatBox_action_icon-hover: var(--semi-color-text-0); // 聊天框操作区域按钮图标hover颜色
|
package/checkbox/checkbox.scss
CHANGED
|
@@ -148,7 +148,7 @@ $module: #{$prefix}-checkbox;
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
&.#{$module}-cardType.#{$module}-unChecked.#{$module}-
|
|
151
|
+
&.#{$module}-cardType.#{$module}-unChecked.#{$module}-cardType_enable {
|
|
152
152
|
.#{$module}-inner-display {
|
|
153
153
|
background: $color-checkbox_cardType_inner-bg-hover;
|
|
154
154
|
}
|
|
@@ -175,7 +175,7 @@ $module: #{$prefix}-checkbox;
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
&.#{$module}-cardType.#{$module}-unChecked.#{$module}-
|
|
178
|
+
&.#{$module}-cardType.#{$module}-unChecked.#{$module}-cardType_enable {
|
|
179
179
|
.#{$module}-inner-display {
|
|
180
180
|
background: $color-checkbox_cardType_inner-bg-active;
|
|
181
181
|
}
|
package/form/foundation.ts
CHANGED
|
@@ -194,6 +194,7 @@ export default class FormFoundation extends BaseFoundation<BaseFormAdapter> {
|
|
|
194
194
|
} else {
|
|
195
195
|
this.data.errors = result;
|
|
196
196
|
this._adapter.notifyChange(this.data);
|
|
197
|
+
|
|
197
198
|
this.injectErrorToField(result);
|
|
198
199
|
this._adapter.forceUpdate();
|
|
199
200
|
this._autoScroll(100);
|
|
@@ -212,6 +213,7 @@ export default class FormFoundation extends BaseFoundation<BaseFormAdapter> {
|
|
|
212
213
|
this.data.errors = maybePromisedErrors;
|
|
213
214
|
this.injectErrorToField(maybePromisedErrors);
|
|
214
215
|
this._adapter.notifyChange(this.data);
|
|
216
|
+
|
|
215
217
|
this._adapter.forceUpdate();
|
|
216
218
|
this._autoScroll(100);
|
|
217
219
|
reject(maybePromisedErrors);
|
|
@@ -241,6 +243,7 @@ export default class FormFoundation extends BaseFoundation<BaseFormAdapter> {
|
|
|
241
243
|
Promise.all(promiseSet).then(() => {
|
|
242
244
|
// After the centralized verification is completed, trigger notify and forceUpdate once.
|
|
243
245
|
this._adapter.notifyChange(this.data);
|
|
246
|
+
|
|
244
247
|
this._adapter.forceUpdate();
|
|
245
248
|
const errors = this.getError();
|
|
246
249
|
if (this._isValid(targetFields)) {
|
|
@@ -493,12 +496,14 @@ export default class FormFoundation extends BaseFoundation<BaseFormAdapter> {
|
|
|
493
496
|
const notNotify = opts && opts.notNotify;
|
|
494
497
|
const notUpdate = opts && opts.notUpdate;
|
|
495
498
|
ObjectUtil.set(this.data.errors, field, error);
|
|
499
|
+
|
|
500
|
+
|
|
496
501
|
// The setError caused by centralized validation does not need to trigger notify, otherwise it will be called too frequently, as many times as there are fields
|
|
497
|
-
// 集中validate时,引起的setError不需要触发notify,否则会过于频繁调用,有多少个field就调用了多少次
|
|
498
502
|
if (!notNotify) {
|
|
499
503
|
this._adapter.notifyChange(this.data);
|
|
500
504
|
}
|
|
501
|
-
|
|
505
|
+
this._adapter.notifyErrorChange(this.data.errors, { [field]: error });
|
|
506
|
+
|
|
502
507
|
if (!notUpdate) {
|
|
503
508
|
this._adapter.forceUpdate(callback);
|
|
504
509
|
}
|
package/form/interface.ts
CHANGED
|
@@ -17,6 +17,7 @@ export interface BaseFormAdapter<P = Record<string, any>, S = Record<string, any
|
|
|
17
17
|
forceUpdate: (callback?: () => void) => void;
|
|
18
18
|
notifyChange: (formState: FormState) => void;
|
|
19
19
|
notifyValueChange: (values: any, changedValues: any) => void;
|
|
20
|
+
notifyErrorChange: (errors: any, changedError: any) => void;
|
|
20
21
|
notifyReset: () => void;
|
|
21
22
|
getInitValues: () => Partial<Values>;
|
|
22
23
|
getFormProps: (keys: undefined | string | Array<string>) => any;
|
package/input/input.scss
CHANGED
|
@@ -593,7 +593,6 @@ $module: #{$prefix}-input;
|
|
|
593
593
|
align-content: center;
|
|
594
594
|
flex-wrap: wrap;
|
|
595
595
|
|
|
596
|
-
// select与autocomplete的border-radius都是基于select
|
|
597
596
|
.#{$prefix}-select,
|
|
598
597
|
.#{$prefix}-tagInput,
|
|
599
598
|
.#{$prefix}-cascader,
|
|
@@ -633,8 +632,8 @@ $module: #{$prefix}-input;
|
|
|
633
632
|
.#{$prefix}-datepicker,
|
|
634
633
|
.#{$prefix}-timepicker,
|
|
635
634
|
.#{$prefix}-autocomplete {
|
|
636
|
-
|
|
637
|
-
|
|
635
|
+
|
|
636
|
+
.#{$module}-wrapper,
|
|
638
637
|
.#{$prefix}-datepicker-range-input {
|
|
639
638
|
border-radius: 0;
|
|
640
639
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* shadow */
|
|
2
2
|
/* sizing */
|
|
3
3
|
/* spacing */
|
|
4
|
-
.semi-
|
|
4
|
+
.semi-autocomplete-option {
|
|
5
5
|
font-size: 14px;
|
|
6
6
|
line-height: 20px;
|
|
7
7
|
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
box-sizing: border-box;
|
|
21
21
|
transition: background-color var(--semi-transition_duration-none) var(--semi-transition_function-easeIn) var(--semi-transition_delay-none);
|
|
22
22
|
}
|
|
23
|
-
.semi-
|
|
23
|
+
.semi-autocomplete-option-icon {
|
|
24
24
|
width: 12px;
|
|
25
25
|
color: transparent;
|
|
26
26
|
visibility: hidden;
|
|
@@ -29,51 +29,51 @@
|
|
|
29
29
|
justify-content: center;
|
|
30
30
|
align-content: center;
|
|
31
31
|
}
|
|
32
|
-
.semi-
|
|
32
|
+
.semi-autocomplete-option-text {
|
|
33
33
|
display: flex;
|
|
34
34
|
flex-wrap: wrap;
|
|
35
35
|
white-space: pre;
|
|
36
36
|
}
|
|
37
|
-
.semi-
|
|
37
|
+
.semi-autocomplete-option-keyword {
|
|
38
38
|
color: var(--semi-color-primary);
|
|
39
39
|
background-color: inherit;
|
|
40
40
|
font-weight: 600;
|
|
41
41
|
}
|
|
42
|
-
.semi-
|
|
42
|
+
.semi-autocomplete-option:active {
|
|
43
43
|
background-color: var(--semi-color-fill-1);
|
|
44
44
|
}
|
|
45
|
-
.semi-
|
|
45
|
+
.semi-autocomplete-option-empty {
|
|
46
46
|
cursor: not-allowed;
|
|
47
47
|
color: var(--semi-color-disabled-text);
|
|
48
48
|
justify-content: center;
|
|
49
49
|
}
|
|
50
|
-
.semi-
|
|
50
|
+
.semi-autocomplete-option-empty:hover {
|
|
51
51
|
background-color: inherit;
|
|
52
52
|
}
|
|
53
|
-
.semi-
|
|
53
|
+
.semi-autocomplete-option-empty:active {
|
|
54
54
|
background-color: inherit;
|
|
55
55
|
}
|
|
56
|
-
.semi-
|
|
56
|
+
.semi-autocomplete-option-disabled {
|
|
57
57
|
color: var(--semi-color-disabled-text);
|
|
58
58
|
cursor: not-allowed;
|
|
59
59
|
}
|
|
60
|
-
.semi-
|
|
60
|
+
.semi-autocomplete-option-disabled:hover {
|
|
61
61
|
background-color: var(--semi-color-fill-0);
|
|
62
62
|
}
|
|
63
|
-
.semi-
|
|
63
|
+
.semi-autocomplete-option-selected {
|
|
64
64
|
font-weight: 600;
|
|
65
65
|
}
|
|
66
|
-
.semi-
|
|
66
|
+
.semi-autocomplete-option-selected .semi-autocomplete-option-icon {
|
|
67
67
|
visibility: visible;
|
|
68
68
|
color: var(--semi-color-text-2);
|
|
69
69
|
}
|
|
70
|
-
.semi-
|
|
70
|
+
.semi-autocomplete-option-focused {
|
|
71
71
|
background-color: var(--semi-color-fill-0);
|
|
72
72
|
}
|
|
73
|
-
.semi-
|
|
73
|
+
.semi-autocomplete-option:first-of-type {
|
|
74
74
|
margin-top: 4px;
|
|
75
75
|
}
|
|
76
|
-
.semi-
|
|
76
|
+
.semi-autocomplete-option:last-of-type {
|
|
77
77
|
margin-bottom: 4px;
|
|
78
78
|
}
|
|
79
79
|
|
|
@@ -8,8 +8,8 @@ var _constants = require("../tooltip/constants");
|
|
|
8
8
|
var _constants2 = require("../base/constants");
|
|
9
9
|
const cssClasses = exports.cssClasses = {
|
|
10
10
|
PREFIX: `${_constants2.BASE_CLASS_PREFIX}-autocomplete`,
|
|
11
|
-
PREFIX_OPTION: `${_constants2.BASE_CLASS_PREFIX}-
|
|
12
|
-
PREFIX_GROUP: `${_constants2.BASE_CLASS_PREFIX}-
|
|
11
|
+
PREFIX_OPTION: `${_constants2.BASE_CLASS_PREFIX}-autocomplete-option`,
|
|
12
|
+
PREFIX_GROUP: `${_constants2.BASE_CLASS_PREFIX}-autocomplete-group`
|
|
13
13
|
};
|
|
14
14
|
const strings = exports.strings = {
|
|
15
15
|
SIZE: ['small', 'large', 'default'],
|
|
@@ -21,6 +21,7 @@ export interface AutoCompleteAdapter<P = Record<string, any>, S = Record<string,
|
|
|
21
21
|
updateInputValue: (inputValue: string | number) => void;
|
|
22
22
|
toggleListVisible: (isShow: boolean) => void;
|
|
23
23
|
updateOptionList: (optionList: Array<StateOptionItem>) => void;
|
|
24
|
+
updateScrollTop: (index: number) => void;
|
|
24
25
|
updateSelection: (selection: Map<any, any>) => void;
|
|
25
26
|
notifySearch: (inputValue: string) => void;
|
|
26
27
|
notifyChange: (value: string | number) => void;
|
|
@@ -182,9 +182,8 @@
|
|
|
182
182
|
align-items: center;
|
|
183
183
|
height: 100%;
|
|
184
184
|
justify-content: center;
|
|
185
|
-
width:
|
|
185
|
+
width: 32px;
|
|
186
186
|
color: var(--semi-color-text-2);
|
|
187
|
-
margin-right: 12px;
|
|
188
187
|
}
|
|
189
188
|
.semi-cascader-clearbtn:hover {
|
|
190
189
|
color: var(--semi-color-primary-hover);
|
|
@@ -360,7 +359,7 @@
|
|
|
360
359
|
.semi-cascader-option-lists .semi-cascader-option-icon {
|
|
361
360
|
display: inline-flex;
|
|
362
361
|
flex-shrink: 0;
|
|
363
|
-
width:
|
|
362
|
+
width: 32px;
|
|
364
363
|
color: var(--semi-color-text-2);
|
|
365
364
|
}
|
|
366
365
|
.semi-cascader-option-lists .semi-cascader-option-icon-active, .semi-cascader-option-lists .semi-cascader-option-icon-empty {
|
|
@@ -370,13 +369,13 @@
|
|
|
370
369
|
margin-left: 8px;
|
|
371
370
|
}
|
|
372
371
|
.semi-cascader-option-lists .semi-cascader-option-spin-icon {
|
|
373
|
-
width:
|
|
374
|
-
height:
|
|
372
|
+
width: 32px;
|
|
373
|
+
height: 32px;
|
|
375
374
|
line-height: 0;
|
|
376
375
|
}
|
|
377
376
|
.semi-cascader-option-lists .semi-cascader-option-spin-icon svg {
|
|
378
|
-
width:
|
|
379
|
-
height:
|
|
377
|
+
width: 32px;
|
|
378
|
+
height: 32px;
|
|
380
379
|
}
|
|
381
380
|
.semi-cascader-option-lists .semi-cascader-option-label {
|
|
382
381
|
display: flex;
|
|
@@ -442,12 +441,6 @@
|
|
|
442
441
|
.semi-portal-rtl .semi-cascader {
|
|
443
442
|
direction: rtl;
|
|
444
443
|
}
|
|
445
|
-
.semi-rtl .semi-cascader-arrow, .semi-rtl .semi-cascader-clearbtn,
|
|
446
|
-
.semi-portal-rtl .semi-cascader-arrow,
|
|
447
|
-
.semi-portal-rtl .semi-cascader-clearbtn {
|
|
448
|
-
margin-right: 0;
|
|
449
|
-
margin-left: 12px;
|
|
450
|
-
}
|
|
451
444
|
.semi-rtl .semi-cascader-inset-label,
|
|
452
445
|
.semi-portal-rtl .semi-cascader-inset-label {
|
|
453
446
|
margin-right: 12px;
|
|
@@ -500,25 +493,27 @@
|
|
|
500
493
|
.semi-cascader-option-lists-rtl {
|
|
501
494
|
direction: rtl;
|
|
502
495
|
}
|
|
503
|
-
.semi-cascader-option-lists
|
|
496
|
+
.semi-cascader-option-lists.semi-cascader-option-lists-rtl ul > li {
|
|
504
497
|
padding-right: 12px;
|
|
505
498
|
padding-left: auto;
|
|
506
499
|
}
|
|
507
|
-
.semi-cascader-option-lists
|
|
500
|
+
.semi-cascader-option-lists.semi-cascader-option-lists-rtl .semi-cascader-option-list {
|
|
508
501
|
border-left: 0;
|
|
509
502
|
border-right: 1px solid var(--semi-color-fill-0);
|
|
510
503
|
}
|
|
511
|
-
.semi-cascader-option-lists
|
|
504
|
+
.semi-cascader-option-lists.semi-cascader-option-lists-rtl .semi-cascader-option-list:first-child {
|
|
512
505
|
border-right: none;
|
|
513
506
|
}
|
|
514
|
-
.semi-cascader-option-lists
|
|
507
|
+
.semi-cascader-option-lists.semi-cascader-option-lists-rtl .semi-cascader-option-icon-active, .semi-cascader-option-lists.semi-cascader-option-lists-rtl .semi-cascader-option-icon-empty {
|
|
515
508
|
margin-right: 0;
|
|
516
509
|
margin-left: 8px;
|
|
517
510
|
}
|
|
518
|
-
.semi-cascader-option-lists
|
|
511
|
+
.semi-cascader-option-lists.semi-cascader-option-lists-rtl .semi-cascader-option-flatten {
|
|
519
512
|
padding-right: 0;
|
|
520
513
|
padding-left: 64px;
|
|
521
514
|
}
|
|
522
|
-
.semi-cascader-option-lists
|
|
515
|
+
.semi-cascader-option-lists.semi-cascader-option-lists-rtl .semi-cascader-option .semi-icon-chevron_right {
|
|
516
|
+
margin-left: 0;
|
|
517
|
+
margin-right: 8px;
|
|
523
518
|
transform: scaleX(-1);
|
|
524
519
|
}
|
|
@@ -5,12 +5,6 @@ $module: #{$prefix}-cascader;
|
|
|
5
5
|
.#{$module} {
|
|
6
6
|
direction: rtl;
|
|
7
7
|
|
|
8
|
-
&-arrow,
|
|
9
|
-
&-clearbtn {
|
|
10
|
-
margin-right: 0;
|
|
11
|
-
margin-left: $spacing-cascader_clearBtn-marginRight;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
8
|
&-inset-label {
|
|
15
9
|
margin-right: $spacing-cascader_label-marginRight;
|
|
16
10
|
margin-left: $spacing-cascader_label-marginRight;
|
|
@@ -79,12 +73,12 @@ $module: #{$prefix}-cascader;
|
|
|
79
73
|
direction: rtl;
|
|
80
74
|
}
|
|
81
75
|
|
|
82
|
-
|
|
76
|
+
&.#{$module}-option-lists-rtl ul > li {
|
|
83
77
|
padding-right: $spacing-cascader_option-paddingLeft;
|
|
84
78
|
padding-left: auto;
|
|
85
79
|
}
|
|
86
80
|
|
|
87
|
-
|
|
81
|
+
&.#{$module}-option-lists-rtl .#{$module}-option-list {
|
|
88
82
|
border-left: 0;
|
|
89
83
|
border-right: $width-cascader_option_list-border solid $color-cascader_option_list-border-default;
|
|
90
84
|
|
|
@@ -93,7 +87,7 @@ $module: #{$prefix}-cascader;
|
|
|
93
87
|
}
|
|
94
88
|
}
|
|
95
89
|
|
|
96
|
-
|
|
90
|
+
&.#{$module}-option-lists-rtl .#{$module}-option {
|
|
97
91
|
&-icon {
|
|
98
92
|
&-active,
|
|
99
93
|
&-empty {
|
|
@@ -108,6 +102,8 @@ $module: #{$prefix}-cascader;
|
|
|
108
102
|
}
|
|
109
103
|
|
|
110
104
|
.#{$prefix}-icon-chevron_right {
|
|
105
|
+
margin-left: 0;
|
|
106
|
+
margin-right: $spacing-cascader_option_icon-marginLeft;
|
|
111
107
|
transform: scaleX(-1);
|
|
112
108
|
}
|
|
113
109
|
}
|
|
@@ -53,7 +53,6 @@ $spacing-cascader_selection_tag-marginY: 1px; // 级联选择触发器多选时
|
|
|
53
53
|
$spacing-cascader_selection_tagInput-marginLeft: - $spacing-extra-tight; // 级联选择触发器多选搜索时 TagInput 的左外边距
|
|
54
54
|
$spacing-cascader_selection_input-marginLeft: $spacing-extra-tight; // 级联选择触发器多选搜索时输入框的左外边距
|
|
55
55
|
$spacing-cascader_selection_n-marginRight: $spacing-extra-tight; // 超出 maxTagCount 后,+n 的右外边距
|
|
56
|
-
$spacing-cascader_clearBtn-marginRight: 12px; // 级联选择触发器清空按钮右侧外边距
|
|
57
56
|
$spacing-cascader_option-icon-marginLeft: 8px; // 级联选择菜单项图标左侧外边距
|
|
58
57
|
|
|
59
58
|
$color-cascader_selection_n-text-default: var(--semi-color-text-0); // 超出 maxTagCount 后,+n 的文字默认颜色
|
|
@@ -93,7 +92,7 @@ $height-cascader_large: $height-control-large; // 级联选择触发器高度 -
|
|
|
93
92
|
$width-cascader_hover-border: $width-cascader-border; // 级联选择触发器描边宽度 - 悬浮
|
|
94
93
|
$width-cascader_focus-border: $border-thickness-control-focus; // 级联选择触发器描边宽度 - 选中态
|
|
95
94
|
$width-cascader_search-border: 1px; // 级联选择触搜索描边宽度
|
|
96
|
-
$width-cascader-icon:
|
|
95
|
+
$width-cascader-icon: 32px; // 级联选择图标尺寸
|
|
97
96
|
$width-cascader_option: 150px; // 级联选择各级菜单宽度
|
|
98
97
|
$height-cascader_option_list: 180px; // 级联选择菜单高度
|
|
99
98
|
$height-cascader_selection_tagInput_wrapper_small: 22px; //级联选择多选搜索时搜索框最小高度 - 小尺寸
|
package/lib/cjs/chat/chat.css
CHANGED
package/lib/cjs/chat/chat.scss
CHANGED
|
@@ -11,7 +11,7 @@ $radius-chat_dropArea: 16px; // 拖拽上传区域圆角
|
|
|
11
11
|
//color
|
|
12
12
|
$color-chat_action_content-bg: var(--semi-color-bg-0); // 返回按钮/停止生成内容按钮背景颜色
|
|
13
13
|
$color-chat_action_content-border: var(--semi-color-border); // 返回按钮/停止生成按钮描边颜色
|
|
14
|
-
$color-chat_divider: var(--semi-color-text-2); //
|
|
14
|
+
$color-chat_divider: var(--semi-color-text-2); // 分割线文字颜色
|
|
15
15
|
$color-chat_chatBox_title: var(--semi-color-text-0); //聊天框标题颜色
|
|
16
16
|
$color-chat_chatBox_action_icon: var(--semi-color-text-2); // 聊天框操作区域按钮图标颜色
|
|
17
17
|
$color-chat_chatBox_action_icon-hover: var(--semi-color-text-0); // 聊天框操作区域按钮图标hover颜色
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
border-color: var(--semi-color-primary-hover);
|
|
106
106
|
color: var(--semi-color-white);
|
|
107
107
|
}
|
|
108
|
-
.semi-checkbox:hover.semi-checkbox-cardType.semi-checkbox-unChecked.semi-checkbox-
|
|
108
|
+
.semi-checkbox:hover.semi-checkbox-cardType.semi-checkbox-unChecked.semi-checkbox-cardType_enable .semi-checkbox-inner-display {
|
|
109
109
|
background: var(--semi-color-white);
|
|
110
110
|
}
|
|
111
111
|
.semi-checkbox:active .semi-checkbox-inner-display {
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
border-color: var(--semi-color-primary-active);
|
|
123
123
|
color: var(--semi-color-white);
|
|
124
124
|
}
|
|
125
|
-
.semi-checkbox:active.semi-checkbox-cardType.semi-checkbox-unChecked.semi-checkbox-
|
|
125
|
+
.semi-checkbox:active.semi-checkbox-cardType.semi-checkbox-unChecked.semi-checkbox-cardType_enable .semi-checkbox-inner-display {
|
|
126
126
|
background: var(--semi-color-white);
|
|
127
127
|
}
|
|
128
128
|
.semi-checkbox-cardType {
|
|
@@ -148,7 +148,7 @@ $module: #{$prefix}-checkbox;
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
&.#{$module}-cardType.#{$module}-unChecked.#{$module}-
|
|
151
|
+
&.#{$module}-cardType.#{$module}-unChecked.#{$module}-cardType_enable {
|
|
152
152
|
.#{$module}-inner-display {
|
|
153
153
|
background: $color-checkbox_cardType_inner-bg-hover;
|
|
154
154
|
}
|
|
@@ -175,7 +175,7 @@ $module: #{$prefix}-checkbox;
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
&.#{$module}-cardType.#{$module}-unChecked.#{$module}-
|
|
178
|
+
&.#{$module}-cardType.#{$module}-unChecked.#{$module}-cardType_enable {
|
|
179
179
|
.#{$module}-inner-display {
|
|
180
180
|
background: $color-checkbox_cardType_inner-bg-active;
|
|
181
181
|
}
|
|
@@ -461,10 +461,12 @@ class FormFoundation extends _foundation.default {
|
|
|
461
461
|
const notUpdate = opts && opts.notUpdate;
|
|
462
462
|
ObjectUtil.set(this.data.errors, field, error);
|
|
463
463
|
// The setError caused by centralized validation does not need to trigger notify, otherwise it will be called too frequently, as many times as there are fields
|
|
464
|
-
// 集中validate时,引起的setError不需要触发notify,否则会过于频繁调用,有多少个field就调用了多少次
|
|
465
464
|
if (!notNotify) {
|
|
466
465
|
this._adapter.notifyChange(this.data);
|
|
467
466
|
}
|
|
467
|
+
this._adapter.notifyErrorChange(this.data.errors, {
|
|
468
|
+
[field]: error
|
|
469
|
+
});
|
|
468
470
|
if (!notUpdate) {
|
|
469
471
|
this._adapter.forceUpdate(callback);
|
|
470
472
|
}
|
|
@@ -11,6 +11,7 @@ export interface BaseFormAdapter<P = Record<string, any>, S = Record<string, any
|
|
|
11
11
|
forceUpdate: (callback?: () => void) => void;
|
|
12
12
|
notifyChange: (formState: FormState) => void;
|
|
13
13
|
notifyValueChange: (values: any, changedValues: any) => void;
|
|
14
|
+
notifyErrorChange: (errors: any, changedError: any) => void;
|
|
14
15
|
notifyReset: () => void;
|
|
15
16
|
getInitValues: () => Partial<Values>;
|
|
16
17
|
getFormProps: (keys: undefined | string | Array<string>) => any;
|
package/lib/cjs/input/input.css
CHANGED
|
@@ -491,15 +491,13 @@
|
|
|
491
491
|
.semi-input-group .semi-select {
|
|
492
492
|
overflow-y: visible;
|
|
493
493
|
}
|
|
494
|
-
.semi-input-group .semi-input-number,
|
|
495
|
-
.semi-input-group .semi-datepicker,
|
|
496
|
-
.semi-input-group .semi-timepicker,
|
|
497
|
-
.semi-input-group .semi-autocomplete {
|
|
498
|
-
border-radius: 0;
|
|
499
|
-
}
|
|
494
|
+
.semi-input-group .semi-input-number .semi-input-wrapper,
|
|
500
495
|
.semi-input-group .semi-input-number .semi-datepicker-range-input,
|
|
496
|
+
.semi-input-group .semi-datepicker .semi-input-wrapper,
|
|
501
497
|
.semi-input-group .semi-datepicker .semi-datepicker-range-input,
|
|
498
|
+
.semi-input-group .semi-timepicker .semi-input-wrapper,
|
|
502
499
|
.semi-input-group .semi-timepicker .semi-datepicker-range-input,
|
|
500
|
+
.semi-input-group .semi-autocomplete .semi-input-wrapper,
|
|
503
501
|
.semi-input-group .semi-autocomplete .semi-datepicker-range-input {
|
|
504
502
|
border-radius: 0;
|
|
505
503
|
}
|
package/lib/cjs/input/input.scss
CHANGED
|
@@ -593,7 +593,6 @@ $module: #{$prefix}-input;
|
|
|
593
593
|
align-content: center;
|
|
594
594
|
flex-wrap: wrap;
|
|
595
595
|
|
|
596
|
-
// select与autocomplete的border-radius都是基于select
|
|
597
596
|
.#{$prefix}-select,
|
|
598
597
|
.#{$prefix}-tagInput,
|
|
599
598
|
.#{$prefix}-cascader,
|
|
@@ -633,8 +632,8 @@ $module: #{$prefix}-input;
|
|
|
633
632
|
.#{$prefix}-datepicker,
|
|
634
633
|
.#{$prefix}-timepicker,
|
|
635
634
|
.#{$prefix}-autocomplete {
|
|
636
|
-
|
|
637
|
-
|
|
635
|
+
|
|
636
|
+
.#{$module}-wrapper,
|
|
638
637
|
.#{$prefix}-datepicker-range-input {
|
|
639
638
|
border-radius: 0;
|
|
640
639
|
}
|