@douyinfe/semi-foundation 2.88.1 → 2.88.2

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/image/image.scss CHANGED
@@ -19,6 +19,13 @@ $module: #{$prefix}-image;
19
19
  max-width: none;
20
20
  }
21
21
 
22
+ &-tooltip-children-wrapper {
23
+ display: inline-flex;
24
+ width: fit-content;
25
+ height: fit-content;
26
+ vertical-align: middle;
27
+ }
28
+
22
29
  &-img {
23
30
  vertical-align: top;
24
31
  border-radius: inherit;
@@ -15,6 +15,12 @@
15
15
  */
16
16
  max-width: none;
17
17
  }
18
+ .semi-image-tooltip-children-wrapper {
19
+ display: inline-flex;
20
+ width: fit-content;
21
+ height: fit-content;
22
+ vertical-align: middle;
23
+ }
18
24
  .semi-image-img {
19
25
  vertical-align: top;
20
26
  border-radius: inherit;
@@ -19,6 +19,13 @@ $module: #{$prefix}-image;
19
19
  max-width: none;
20
20
  }
21
21
 
22
+ &-tooltip-children-wrapper {
23
+ display: inline-flex;
24
+ width: fit-content;
25
+ height: fit-content;
26
+ vertical-align: middle;
27
+ }
28
+
22
29
  &-img {
23
30
  vertical-align: top;
24
31
  border-radius: inherit;
@@ -49,6 +49,11 @@
49
49
  transition: opacity 0.2s cubic-bezier(0.5, -0.1, 1, 0.4);
50
50
  opacity: 0;
51
51
  }
52
+ .semi-navigation-collapsed-wrapper {
53
+ display: flex;
54
+ width: fit-content;
55
+ height: fit-content;
56
+ }
52
57
  .semi-navigation-sub-wrap .semi-navigation-sub-title, .semi-navigation-item {
53
58
  cursor: pointer;
54
59
  display: flex;
@@ -65,6 +65,12 @@ $module: #{$prefix}-navigation;
65
65
  transition: $motion-navigation_collapsed_opacity;
66
66
  opacity: 0;
67
67
  }
68
+
69
+ &-wrapper {
70
+ display: flex;
71
+ width: fit-content;
72
+ height: fit-content;
73
+ }
68
74
  }
69
75
 
70
76
  // 对于普通item和二级sub-title,都是font-weight normal
@@ -174,10 +174,11 @@ class RatingFoundation extends _foundation.default {
174
174
  const {
175
175
  count,
176
176
  allowHalf,
177
- preventScroll
177
+ preventScroll,
178
+ tooltips
178
179
  } = this.getProps();
179
180
  const index = Math.ceil(value) - 1;
180
- const starElement = [...event.currentTarget.childNodes].map(item => item.childNodes[0].childNodes);
181
+ const starElement = [...event.currentTarget.childNodes].map(item => tooltips ? item.childNodes[0].childNodes[0].childNodes : item.childNodes[0].childNodes);
181
182
  if (index < 0) {
182
183
  starElement[count][0].focus({
183
184
  preventScroll
@@ -51,6 +51,11 @@
51
51
  height: 24px;
52
52
  font-size: 24px;
53
53
  }
54
+ .semi-rating-star-outer {
55
+ display: inline-flex;
56
+ width: fit-content;
57
+ height: fit-content;
58
+ }
54
59
  .semi-rating-star-wrapper {
55
60
  position: relative;
56
61
  overflow: hidden;
@@ -68,6 +68,12 @@ $module: #{$prefix}-rating;
68
68
  font-size: $font-rating_item_default-fontSize;
69
69
  }
70
70
 
71
+ &-outer {
72
+ display: inline-flex;
73
+ width: fit-content;
74
+ height: fit-content;
75
+ }
76
+
71
77
  &-wrapper {
72
78
  position: relative;
73
79
  overflow: hidden;
@@ -5,6 +5,12 @@
5
5
  display: flex;
6
6
  flex-wrap: wrap;
7
7
  }
8
+ .semi-upload-tooltip-children-wrapper {
9
+ display: inline-flex;
10
+ width: fit-content;
11
+ height: fit-content;
12
+ vertical-align: middle;
13
+ }
8
14
  .semi-upload-disabled {
9
15
  cursor: not-allowed;
10
16
  }
@@ -6,6 +6,13 @@ $module: #{$prefix}-upload;
6
6
  display: flex;
7
7
  flex-wrap: wrap;
8
8
 
9
+ &-tooltip-children-wrapper {
10
+ display: inline-flex;
11
+ width: fit-content;
12
+ height: fit-content;
13
+ vertical-align: middle;
14
+ }
15
+
9
16
  &-disabled {
10
17
  cursor: not-allowed;
11
18
 
@@ -15,6 +15,12 @@
15
15
  */
16
16
  max-width: none;
17
17
  }
18
+ .semi-image-tooltip-children-wrapper {
19
+ display: inline-flex;
20
+ width: fit-content;
21
+ height: fit-content;
22
+ vertical-align: middle;
23
+ }
18
24
  .semi-image-img {
19
25
  vertical-align: top;
20
26
  border-radius: inherit;
@@ -19,6 +19,13 @@ $module: #{$prefix}-image;
19
19
  max-width: none;
20
20
  }
21
21
 
22
+ &-tooltip-children-wrapper {
23
+ display: inline-flex;
24
+ width: fit-content;
25
+ height: fit-content;
26
+ vertical-align: middle;
27
+ }
28
+
22
29
  &-img {
23
30
  vertical-align: top;
24
31
  border-radius: inherit;
@@ -49,6 +49,11 @@
49
49
  transition: opacity 0.2s cubic-bezier(0.5, -0.1, 1, 0.4);
50
50
  opacity: 0;
51
51
  }
52
+ .semi-navigation-collapsed-wrapper {
53
+ display: flex;
54
+ width: fit-content;
55
+ height: fit-content;
56
+ }
52
57
  .semi-navigation-sub-wrap .semi-navigation-sub-title, .semi-navigation-item {
53
58
  cursor: pointer;
54
59
  display: flex;
@@ -65,6 +65,12 @@ $module: #{$prefix}-navigation;
65
65
  transition: $motion-navigation_collapsed_opacity;
66
66
  opacity: 0;
67
67
  }
68
+
69
+ &-wrapper {
70
+ display: flex;
71
+ width: fit-content;
72
+ height: fit-content;
73
+ }
68
74
  }
69
75
 
70
76
  // 对于普通item和二级sub-title,都是font-weight normal
@@ -167,10 +167,11 @@ export default class RatingFoundation extends BaseFoundation {
167
167
  const {
168
168
  count,
169
169
  allowHalf,
170
- preventScroll
170
+ preventScroll,
171
+ tooltips
171
172
  } = this.getProps();
172
173
  const index = Math.ceil(value) - 1;
173
- const starElement = [...event.currentTarget.childNodes].map(item => item.childNodes[0].childNodes);
174
+ const starElement = [...event.currentTarget.childNodes].map(item => tooltips ? item.childNodes[0].childNodes[0].childNodes : item.childNodes[0].childNodes);
174
175
  if (index < 0) {
175
176
  starElement[count][0].focus({
176
177
  preventScroll
@@ -51,6 +51,11 @@
51
51
  height: 24px;
52
52
  font-size: 24px;
53
53
  }
54
+ .semi-rating-star-outer {
55
+ display: inline-flex;
56
+ width: fit-content;
57
+ height: fit-content;
58
+ }
54
59
  .semi-rating-star-wrapper {
55
60
  position: relative;
56
61
  overflow: hidden;
@@ -68,6 +68,12 @@ $module: #{$prefix}-rating;
68
68
  font-size: $font-rating_item_default-fontSize;
69
69
  }
70
70
 
71
+ &-outer {
72
+ display: inline-flex;
73
+ width: fit-content;
74
+ height: fit-content;
75
+ }
76
+
71
77
  &-wrapper {
72
78
  position: relative;
73
79
  overflow: hidden;
@@ -5,6 +5,12 @@
5
5
  display: flex;
6
6
  flex-wrap: wrap;
7
7
  }
8
+ .semi-upload-tooltip-children-wrapper {
9
+ display: inline-flex;
10
+ width: fit-content;
11
+ height: fit-content;
12
+ vertical-align: middle;
13
+ }
8
14
  .semi-upload-disabled {
9
15
  cursor: not-allowed;
10
16
  }
@@ -6,6 +6,13 @@ $module: #{$prefix}-upload;
6
6
  display: flex;
7
7
  flex-wrap: wrap;
8
8
 
9
+ &-tooltip-children-wrapper {
10
+ display: inline-flex;
11
+ width: fit-content;
12
+ height: fit-content;
13
+ vertical-align: middle;
14
+ }
15
+
9
16
  &-disabled {
10
17
  cursor: not-allowed;
11
18
 
@@ -65,6 +65,12 @@ $module: #{$prefix}-navigation;
65
65
  transition: $motion-navigation_collapsed_opacity;
66
66
  opacity: 0;
67
67
  }
68
+
69
+ &-wrapper {
70
+ display: flex;
71
+ width: fit-content;
72
+ height: fit-content;
73
+ }
68
74
  }
69
75
 
70
76
  // 对于普通item和二级sub-title,都是font-weight normal
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.88.1",
3
+ "version": "2.88.2",
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.88.1",
11
- "@douyinfe/semi-json-viewer-core": "2.88.1",
10
+ "@douyinfe/semi-animation": "2.88.2",
11
+ "@douyinfe/semi-json-viewer-core": "2.88.2",
12
12
  "@mdx-js/mdx": "^3.0.1",
13
13
  "async-validator": "^3.5.0",
14
14
  "classnames": "^2.2.6",
@@ -29,7 +29,7 @@
29
29
  "*.scss",
30
30
  "*.css"
31
31
  ],
32
- "gitHead": "e08d049ae7cbf936679b53146fd9041577c9422b",
32
+ "gitHead": "c4ddfa944bb1685377a053c381aa9f4b3a3b5e26",
33
33
  "devDependencies": {
34
34
  "@babel/plugin-transform-runtime": "^7.15.8",
35
35
  "@babel/preset-env": "^7.15.8",
@@ -146,9 +146,11 @@ export default class RatingFoundation<P = Record<string, any>, S = Record<string
146
146
  }
147
147
 
148
148
  changeFocusStar(value: number, event: any) {
149
- const { count, allowHalf, preventScroll } = this.getProps();
149
+ const { count, allowHalf, preventScroll, tooltips } = this.getProps();
150
150
  const index = Math.ceil(value) - 1;
151
- const starElement = [...event.currentTarget.childNodes].map(item => item.childNodes[0].childNodes);
151
+ const starElement = [...event.currentTarget.childNodes].map(item =>
152
+ tooltips ? item.childNodes[0].childNodes[0].childNodes : item.childNodes[0].childNodes
153
+ );
152
154
  if (index < 0) {
153
155
  starElement[count][0].focus({ preventScroll });
154
156
  } else {
@@ -68,6 +68,12 @@ $module: #{$prefix}-rating;
68
68
  font-size: $font-rating_item_default-fontSize;
69
69
  }
70
70
 
71
+ &-outer {
72
+ display: inline-flex;
73
+ width: fit-content;
74
+ height: fit-content;
75
+ }
76
+
71
77
  &-wrapper {
72
78
  position: relative;
73
79
  overflow: hidden;
@@ -6,6 +6,13 @@ $module: #{$prefix}-upload;
6
6
  display: flex;
7
7
  flex-wrap: wrap;
8
8
 
9
+ &-tooltip-children-wrapper {
10
+ display: inline-flex;
11
+ width: fit-content;
12
+ height: fit-content;
13
+ vertical-align: middle;
14
+ }
15
+
9
16
  &-disabled {
10
17
  cursor: not-allowed;
11
18