@douyinfe/semi-foundation 2.9.0-beta.1 → 2.9.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.
@@ -58,7 +58,7 @@ $module: #{$prefix}-divider;
58
58
 
59
59
  &-right {
60
60
  &::before {
61
- flex: 1;
61
+ flex: 1;
62
62
  }
63
63
 
64
64
  &::after {
package/form/form.scss CHANGED
@@ -84,7 +84,6 @@ $rating: #{$prefix}-rating;
84
84
  vertical-align: middle;
85
85
  @include font-size-regular;
86
86
  flex-shrink: 0;
87
- user-select: none;
88
87
 
89
88
  &-disabled {
90
89
  color: $color-form_label_disabled-text-default;
@@ -58,7 +58,7 @@ $module: #{$prefix}-divider;
58
58
 
59
59
  &-right {
60
60
  &::before {
61
- flex: 1;
61
+ flex: 1;
62
62
  }
63
63
 
64
64
  &::after {
@@ -47,7 +47,6 @@
47
47
  line-height: 20px;
48
48
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
49
49
  flex-shrink: 0;
50
- user-select: none;
51
50
  }
52
51
  .semi-form-field-label-disabled {
53
52
  color: var(--semi-color-disabled-text);
@@ -84,7 +84,6 @@ $rating: #{$prefix}-rating;
84
84
  vertical-align: middle;
85
85
  @include font-size-regular;
86
86
  flex-shrink: 0;
87
- user-select: none;
88
87
 
89
88
  &-disabled {
90
89
  color: $color-form_label_disabled-text-default;
@@ -109,8 +109,12 @@ class TagInputFoundation extends _foundation.default {
109
109
 
110
110
  const code = e.keyCode;
111
111
 
112
- if (code === _keyCode.default.ENTER && inputValue !== '') {
113
- this._handleAddTags(e);
112
+ if (code === _keyCode.default.ENTER) {
113
+ e.preventDefault(); // prevent trigger submit when using in form
114
+
115
+ if (inputValue !== '') {
116
+ this._handleAddTags(e);
117
+ }
114
118
  }
115
119
 
116
120
  const {
@@ -103,7 +103,7 @@
103
103
  .semi-transfer-left-empty {
104
104
  height: 36px;
105
105
  }
106
- .semi-transfer-left .semi-spin {
106
+ .semi-transfer-left > .semi-spin {
107
107
  width: 100%;
108
108
  flex-grow: 1;
109
109
  }
@@ -115,7 +115,7 @@ $module: #{$prefix}-transfer;
115
115
  &-empty {
116
116
  height: $height-transfer_left_empty;
117
117
  }
118
- .#{$prefix}-spin {
118
+ >.#{$prefix}-spin {
119
119
  width: 100%;
120
120
  flex-grow: 1;
121
121
  }
@@ -58,7 +58,7 @@ $module: #{$prefix}-divider;
58
58
 
59
59
  &-right {
60
60
  &::before {
61
- flex: 1;
61
+ flex: 1;
62
62
  }
63
63
 
64
64
  &::after {
@@ -47,7 +47,6 @@
47
47
  line-height: 20px;
48
48
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
49
49
  flex-shrink: 0;
50
- user-select: none;
51
50
  }
52
51
  .semi-form-field-label-disabled {
53
52
  color: var(--semi-color-disabled-text);
@@ -84,7 +84,6 @@ $rating: #{$prefix}-rating;
84
84
  vertical-align: middle;
85
85
  @include font-size-regular;
86
86
  flex-shrink: 0;
87
- user-select: none;
88
87
 
89
88
  &-disabled {
90
89
  color: $color-form_label_disabled-text-default;
@@ -82,8 +82,12 @@ class TagInputFoundation extends BaseFoundation {
82
82
 
83
83
  const code = e.keyCode;
84
84
 
85
- if (code === keyCode.ENTER && inputValue !== '') {
86
- this._handleAddTags(e);
85
+ if (code === keyCode.ENTER) {
86
+ e.preventDefault(); // prevent trigger submit when using in form
87
+
88
+ if (inputValue !== '') {
89
+ this._handleAddTags(e);
90
+ }
87
91
  }
88
92
 
89
93
  const {
@@ -103,7 +103,7 @@
103
103
  .semi-transfer-left-empty {
104
104
  height: 36px;
105
105
  }
106
- .semi-transfer-left .semi-spin {
106
+ .semi-transfer-left > .semi-spin {
107
107
  width: 100%;
108
108
  flex-grow: 1;
109
109
  }
@@ -115,7 +115,7 @@ $module: #{$prefix}-transfer;
115
115
  &-empty {
116
116
  height: $height-transfer_left_empty;
117
117
  }
118
- .#{$prefix}-spin {
118
+ >.#{$prefix}-spin {
119
119
  width: 100%;
120
120
  flex-grow: 1;
121
121
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.9.0-beta.1",
3
+ "version": "2.9.0",
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.9.0-beta.1",
11
+ "@douyinfe/semi-animation": "2.9.0",
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": "b246f204d2f33e5de4155b5d0377eace25b6456f",
27
+ "gitHead": "22b74e58077b068daa6b35bc8b32f47a064734a3",
28
28
  "devDependencies": {
29
29
  "@babel/plugin-proposal-decorators": "^7.15.8",
30
30
  "@babel/plugin-transform-runtime": "^7.15.8",
@@ -83,8 +83,11 @@ class TagInputFoundation extends BaseFoundation<TagInputAdapter> {
83
83
  tagsArray
84
84
  } = this._adapter.getStates();
85
85
  const code = e.keyCode;
86
- if (code === keyCode.ENTER && inputValue !== '') {
87
- this._handleAddTags(e);
86
+ if (code === keyCode.ENTER) {
87
+ e.preventDefault(); // prevent trigger submit when using in form
88
+ if (inputValue !== '') {
89
+ this._handleAddTags(e);
90
+ }
88
91
  }
89
92
  const { length } = tagsArray;
90
93
  if (code === keyCode.BACKSPACE && inputValue === '' && length > 0) {
@@ -115,7 +115,7 @@ $module: #{$prefix}-transfer;
115
115
  &-empty {
116
116
  height: $height-transfer_left_empty;
117
117
  }
118
- .#{$prefix}-spin {
118
+ >.#{$prefix}-spin {
119
119
  width: 100%;
120
120
  flex-grow: 1;
121
121
  }