@douyinfe/semi-foundation 2.68.2 → 2.68.4

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/chat/chat.scss CHANGED
@@ -132,7 +132,7 @@ $module: #{$prefix}-chat;
132
132
  flex-direction: row-reverse;
133
133
 
134
134
  .#{$module}-chatBox-wrap {
135
- align-items: end;
135
+ align-items: flex-end;
136
136
  }
137
137
  }
138
138
 
@@ -204,7 +204,7 @@ $module: #{$prefix}-chat;
204
204
  &-wrap {
205
205
  display: flex;
206
206
  flex-direction: column;
207
- align-items: start;
207
+ align-items: flex-start;
208
208
  position: relative;
209
209
  row-gap: $spacing-chat_chatBox_wrap;
210
210
  }
@@ -431,7 +431,7 @@ $module: #{$prefix}-chat;
431
431
  border-radius: $radius-chat_inputBox_container;
432
432
  padding: $spacing-chat_inputBox_container-padding;
433
433
  border: $width-chat_inputBox_container-border solid $color-chat_inputBox_container-border;
434
- align-items: end;
434
+ align-items: flex-end;
435
435
  }
436
436
 
437
437
  &-inputArea {
@@ -113,7 +113,7 @@ export default class ChatFoundation <P = Record<string, any>, S = Record<string,
113
113
  }
114
114
 
115
115
  containerScroll = (e: any) => {
116
- e.persist();
116
+ this._persistEvent(e);
117
117
  const update = () => {
118
118
  this.getScroll(e.target);
119
119
  };
@@ -103,7 +103,7 @@
103
103
  flex-direction: row-reverse;
104
104
  }
105
105
  .semi-chat-chatBox-right .semi-chat-chatBox-wrap {
106
- align-items: end;
106
+ align-items: flex-end;
107
107
  }
108
108
  .semi-chat-chatBox-avatar {
109
109
  flex-shrink: 0;
@@ -157,7 +157,7 @@
157
157
  .semi-chat-chatBox-wrap {
158
158
  display: flex;
159
159
  flex-direction: column;
160
- align-items: start;
160
+ align-items: flex-start;
161
161
  position: relative;
162
162
  row-gap: 8px;
163
163
  }
@@ -340,7 +340,7 @@
340
340
  border-radius: 16px;
341
341
  padding: 11px;
342
342
  border: 1px solid var(--semi-color-border);
343
- align-items: end;
343
+ align-items: flex-end;
344
344
  }
345
345
  .semi-chat-inputBox-inputArea {
346
346
  flex-grow: 1;
@@ -132,7 +132,7 @@ $module: #{$prefix}-chat;
132
132
  flex-direction: row-reverse;
133
133
 
134
134
  .#{$module}-chatBox-wrap {
135
- align-items: end;
135
+ align-items: flex-end;
136
136
  }
137
137
  }
138
138
 
@@ -204,7 +204,7 @@ $module: #{$prefix}-chat;
204
204
  &-wrap {
205
205
  display: flex;
206
206
  flex-direction: column;
207
- align-items: start;
207
+ align-items: flex-start;
208
208
  position: relative;
209
209
  row-gap: $spacing-chat_chatBox_wrap;
210
210
  }
@@ -431,7 +431,7 @@ $module: #{$prefix}-chat;
431
431
  border-radius: $radius-chat_inputBox_container;
432
432
  padding: $spacing-chat_inputBox_container-padding;
433
433
  border: $width-chat_inputBox_container-border solid $color-chat_inputBox_container-border;
434
- align-items: end;
434
+ align-items: flex-end;
435
435
  }
436
436
 
437
437
  &-inputArea {
@@ -66,7 +66,7 @@ class ChatFoundation extends _foundation.default {
66
66
  this.animation.start();
67
67
  };
68
68
  this.containerScroll = e => {
69
- e.persist();
69
+ this._persistEvent(e);
70
70
  const update = () => {
71
71
  this.getScroll(e.target);
72
72
  };
@@ -1130,10 +1130,14 @@ class SelectFoundation extends _foundation.default {
1130
1130
  filter,
1131
1131
  autoFocus
1132
1132
  } = this.getProps();
1133
+ const {
1134
+ showInput
1135
+ } = this.getStates();
1133
1136
  const isMultiple = this._isMultiple();
1134
- if (autoFocus && filter && !isMultiple) {
1135
- // under this condition, when input blur, hide the input
1136
- this.toggle2SearchInput(false);
1137
+ if (filter && !isMultiple) {
1138
+ if (showInput || autoFocus) {
1139
+ this.toggle2SearchInput(false);
1140
+ }
1137
1141
  }
1138
1142
  }
1139
1143
  selectAll() {
@@ -667,9 +667,11 @@ class TreeSelectFoundation extends _foundation.default {
667
667
  const {
668
668
  treeData,
669
669
  filteredShownKeys,
670
- keyEntities,
671
- keyMaps
670
+ keyEntities
672
671
  } = this.getStates();
672
+ const {
673
+ keyMaps
674
+ } = this.getProps();
673
675
  const showFilteredOnly = this._showFilteredOnly();
674
676
  // clone otherwise will be modified unexpectedly
675
677
  const filteredExpandedKeys = new Set(this.getState('filteredExpandedKeys'));
@@ -103,7 +103,7 @@
103
103
  flex-direction: row-reverse;
104
104
  }
105
105
  .semi-chat-chatBox-right .semi-chat-chatBox-wrap {
106
- align-items: end;
106
+ align-items: flex-end;
107
107
  }
108
108
  .semi-chat-chatBox-avatar {
109
109
  flex-shrink: 0;
@@ -157,7 +157,7 @@
157
157
  .semi-chat-chatBox-wrap {
158
158
  display: flex;
159
159
  flex-direction: column;
160
- align-items: start;
160
+ align-items: flex-start;
161
161
  position: relative;
162
162
  row-gap: 8px;
163
163
  }
@@ -340,7 +340,7 @@
340
340
  border-radius: 16px;
341
341
  padding: 11px;
342
342
  border: 1px solid var(--semi-color-border);
343
- align-items: end;
343
+ align-items: flex-end;
344
344
  }
345
345
  .semi-chat-inputBox-inputArea {
346
346
  flex-grow: 1;
@@ -132,7 +132,7 @@ $module: #{$prefix}-chat;
132
132
  flex-direction: row-reverse;
133
133
 
134
134
  .#{$module}-chatBox-wrap {
135
- align-items: end;
135
+ align-items: flex-end;
136
136
  }
137
137
  }
138
138
 
@@ -204,7 +204,7 @@ $module: #{$prefix}-chat;
204
204
  &-wrap {
205
205
  display: flex;
206
206
  flex-direction: column;
207
- align-items: start;
207
+ align-items: flex-start;
208
208
  position: relative;
209
209
  row-gap: $spacing-chat_chatBox_wrap;
210
210
  }
@@ -431,7 +431,7 @@ $module: #{$prefix}-chat;
431
431
  border-radius: $radius-chat_inputBox_container;
432
432
  padding: $spacing-chat_inputBox_container-padding;
433
433
  border: $width-chat_inputBox_container-border solid $color-chat_inputBox_container-border;
434
- align-items: end;
434
+ align-items: flex-end;
435
435
  }
436
436
 
437
437
  &-inputArea {
@@ -59,7 +59,7 @@ export default class ChatFoundation extends BaseFoundation {
59
59
  this.animation.start();
60
60
  };
61
61
  this.containerScroll = e => {
62
- e.persist();
62
+ this._persistEvent(e);
63
63
  const update = () => {
64
64
  this.getScroll(e.target);
65
65
  };
@@ -1121,10 +1121,14 @@ export default class SelectFoundation extends BaseFoundation {
1121
1121
  filter,
1122
1122
  autoFocus
1123
1123
  } = this.getProps();
1124
+ const {
1125
+ showInput
1126
+ } = this.getStates();
1124
1127
  const isMultiple = this._isMultiple();
1125
- if (autoFocus && filter && !isMultiple) {
1126
- // under this condition, when input blur, hide the input
1127
- this.toggle2SearchInput(false);
1128
+ if (filter && !isMultiple) {
1129
+ if (showInput || autoFocus) {
1130
+ this.toggle2SearchInput(false);
1131
+ }
1128
1132
  }
1129
1133
  }
1130
1134
  selectAll() {
@@ -660,9 +660,11 @@ export default class TreeSelectFoundation extends BaseFoundation {
660
660
  const {
661
661
  treeData,
662
662
  filteredShownKeys,
663
- keyEntities,
664
- keyMaps
663
+ keyEntities
665
664
  } = this.getStates();
665
+ const {
666
+ keyMaps
667
+ } = this.getProps();
666
668
  const showFilteredOnly = this._showFilteredOnly();
667
669
  // clone otherwise will be modified unexpectedly
668
670
  const filteredExpandedKeys = new Set(this.getState('filteredExpandedKeys'));
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.68.2",
3
+ "version": "2.68.4",
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.68.2",
10
+ "@douyinfe/semi-animation": "2.68.4",
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": "7fe4e6d5a7d7b30a16e8c4b10ce5f4cf547c41e8",
31
+ "gitHead": "5e76711b7359675d202f9ef512e6e1833d38f5c5",
32
32
  "devDependencies": {
33
33
  "@babel/plugin-transform-runtime": "^7.15.8",
34
34
  "@babel/preset-env": "^7.15.8",
@@ -1113,10 +1113,12 @@ export default class SelectFoundation extends BaseFoundation<SelectAdapter> {
1113
1113
 
1114
1114
  handleInputBlur(e: any) {
1115
1115
  const { filter, autoFocus } = this.getProps();
1116
+ const { showInput } = this.getStates();
1116
1117
  const isMultiple = this._isMultiple();
1117
- if (autoFocus && filter && !isMultiple ) {
1118
- // under this condition, when input blur, hide the input
1119
- this.toggle2SearchInput(false);
1118
+ if (filter && !isMultiple ) {
1119
+ if (showInput || autoFocus) {
1120
+ this.toggle2SearchInput(false);
1121
+ }
1120
1122
  }
1121
1123
  }
1122
1124
 
@@ -776,7 +776,8 @@ export default class TreeSelectFoundation<P = Record<string, any>, S = Record<st
776
776
  return !allChecked;
777
777
  }
778
778
  handleNodeExpandInSearch(e: any, treeNode: BasicTreeNodeProps) {
779
- const { treeData, filteredShownKeys, keyEntities, keyMaps } = this.getStates();
779
+ const { treeData, filteredShownKeys, keyEntities } = this.getStates();
780
+ const { keyMaps } = this.getProps();
780
781
  const showFilteredOnly = this._showFilteredOnly();
781
782
  // clone otherwise will be modified unexpectedly
782
783
  const filteredExpandedKeys = new Set(this.getState('filteredExpandedKeys')) as Set<string>;