@douyinfe/semi-foundation 2.68.3 → 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() {
@@ -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() {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.68.3",
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.3",
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": "78686c4c6292e3a6cbd43896e8835ebfe96d4f84",
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