@douyinfe/semi-foundation 2.65.0-beta.0 → 2.65.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.
@@ -36,6 +36,11 @@ $module: #{$prefix}-button;
36
36
  }
37
37
  }
38
38
 
39
+ &-content{
40
+ display: flex;
41
+ align-items: center;
42
+ }
43
+
39
44
  &-danger {
40
45
  background-color: $color-button_danger-bg-default;
41
46
  color: $color-button_danger-text-default;
@@ -60,12 +60,16 @@ $module: #{$prefix}-button;
60
60
 
61
61
  &-left {
62
62
  margin-right: $spacing-button_iconOnly_content-marginRight;
63
+ display: flex;
64
+ align-items: center;
63
65
  }
64
66
 
65
67
  &-right {
66
68
  margin-left: $spacing-button_iconOnly_content-marginLeft;
69
+ display: flex;
70
+ align-items: center;
67
71
  }
68
72
  }
69
73
  }
70
74
 
71
- @import "./rtl.scss";
75
+ @import "./rtl.scss";
@@ -6,7 +6,7 @@ $module-list: #{$prefix}-scrolllist;
6
6
 
7
7
  .#{$module} {
8
8
  box-sizing: border-box;
9
- display: inline-flex;
9
+ display: inline-block;
10
10
 
11
11
  &-container {
12
12
  display: flex;
@@ -46,6 +46,10 @@
46
46
  .semi-button.semi-button-primary:focus-visible, .semi-button.semi-button-secondary:focus-visible, .semi-button.semi-button-tertiary:focus-visible, .semi-button.semi-button-warning:focus-visible, .semi-button.semi-button-danger:focus-visible {
47
47
  outline: 2px solid var(--semi-color-primary-light-active);
48
48
  }
49
+ .semi-button-content {
50
+ display: flex;
51
+ align-items: center;
52
+ }
49
53
  .semi-button-danger {
50
54
  background-color: var(--semi-color-danger);
51
55
  color: rgba(var(--semi-white), 1);
@@ -36,6 +36,11 @@ $module: #{$prefix}-button;
36
36
  }
37
37
  }
38
38
 
39
+ &-content{
40
+ display: flex;
41
+ align-items: center;
42
+ }
43
+
39
44
  &-danger {
40
45
  background-color: $color-button_danger-bg-default;
41
46
  color: $color-button_danger-text-default;
@@ -42,9 +42,13 @@
42
42
  }
43
43
  .semi-button-content-left {
44
44
  margin-right: 8px;
45
+ display: flex;
46
+ align-items: center;
45
47
  }
46
48
  .semi-button-content-right {
47
49
  margin-left: 8px;
50
+ display: flex;
51
+ align-items: center;
48
52
  }
49
53
 
50
54
  .semi-rtl .semi-button,
@@ -60,12 +60,16 @@ $module: #{$prefix}-button;
60
60
 
61
61
  &-left {
62
62
  margin-right: $spacing-button_iconOnly_content-marginRight;
63
+ display: flex;
64
+ align-items: center;
63
65
  }
64
66
 
65
67
  &-right {
66
68
  margin-left: $spacing-button_iconOnly_content-marginLeft;
69
+ display: flex;
70
+ align-items: center;
67
71
  }
68
72
  }
69
73
  }
70
74
 
71
- @import "./rtl.scss";
75
+ @import "./rtl.scss";
@@ -3,7 +3,7 @@
3
3
  /* spacing */
4
4
  .semi-datepicker {
5
5
  box-sizing: border-box;
6
- display: inline-flex;
6
+ display: inline-block;
7
7
  }
8
8
  .semi-datepicker-container {
9
9
  display: flex;
@@ -6,7 +6,7 @@ $module-list: #{$prefix}-scrolllist;
6
6
 
7
7
  .#{$module} {
8
8
  box-sizing: border-box;
9
- display: inline-flex;
9
+ display: inline-block;
10
10
 
11
11
  &-container {
12
12
  display: flex;
@@ -309,7 +309,12 @@ class SliderFoundation extends _foundation.default {
309
309
  };
310
310
  })();
311
311
  if (Array.isArray(inputValue)) {
312
- return [transWay(inputValue[0]), transWay(inputValue[1])];
312
+ const min = transWay(inputValue[0]);
313
+ const max = transWay(inputValue[1]);
314
+ if (min > max) {
315
+ return this.getState("focusPos") === "min" ? [max, max] : [min, min];
316
+ }
317
+ return [min, max];
313
318
  } else {
314
319
  return transWay(inputValue);
315
320
  }
@@ -46,6 +46,10 @@
46
46
  .semi-button.semi-button-primary:focus-visible, .semi-button.semi-button-secondary:focus-visible, .semi-button.semi-button-tertiary:focus-visible, .semi-button.semi-button-warning:focus-visible, .semi-button.semi-button-danger:focus-visible {
47
47
  outline: 2px solid var(--semi-color-primary-light-active);
48
48
  }
49
+ .semi-button-content {
50
+ display: flex;
51
+ align-items: center;
52
+ }
49
53
  .semi-button-danger {
50
54
  background-color: var(--semi-color-danger);
51
55
  color: rgba(var(--semi-white), 1);
@@ -36,6 +36,11 @@ $module: #{$prefix}-button;
36
36
  }
37
37
  }
38
38
 
39
+ &-content{
40
+ display: flex;
41
+ align-items: center;
42
+ }
43
+
39
44
  &-danger {
40
45
  background-color: $color-button_danger-bg-default;
41
46
  color: $color-button_danger-text-default;
@@ -42,9 +42,13 @@
42
42
  }
43
43
  .semi-button-content-left {
44
44
  margin-right: 8px;
45
+ display: flex;
46
+ align-items: center;
45
47
  }
46
48
  .semi-button-content-right {
47
49
  margin-left: 8px;
50
+ display: flex;
51
+ align-items: center;
48
52
  }
49
53
 
50
54
  .semi-rtl .semi-button,
@@ -60,12 +60,16 @@ $module: #{$prefix}-button;
60
60
 
61
61
  &-left {
62
62
  margin-right: $spacing-button_iconOnly_content-marginRight;
63
+ display: flex;
64
+ align-items: center;
63
65
  }
64
66
 
65
67
  &-right {
66
68
  margin-left: $spacing-button_iconOnly_content-marginLeft;
69
+ display: flex;
70
+ align-items: center;
67
71
  }
68
72
  }
69
73
  }
70
74
 
71
- @import "./rtl.scss";
75
+ @import "./rtl.scss";
@@ -3,7 +3,7 @@
3
3
  /* spacing */
4
4
  .semi-datepicker {
5
5
  box-sizing: border-box;
6
- display: inline-flex;
6
+ display: inline-block;
7
7
  }
8
8
  .semi-datepicker-container {
9
9
  display: flex;
@@ -6,7 +6,7 @@ $module-list: #{$prefix}-scrolllist;
6
6
 
7
7
  .#{$module} {
8
8
  box-sizing: border-box;
9
- display: inline-flex;
9
+ display: inline-block;
10
10
 
11
11
  &-container {
12
12
  display: flex;
@@ -302,7 +302,12 @@ export default class SliderFoundation extends BaseFoundation {
302
302
  };
303
303
  })();
304
304
  if (Array.isArray(inputValue)) {
305
- return [transWay(inputValue[0]), transWay(inputValue[1])];
305
+ const min = transWay(inputValue[0]);
306
+ const max = transWay(inputValue[1]);
307
+ if (min > max) {
308
+ return this.getState("focusPos") === "min" ? [max, max] : [min, min];
309
+ }
310
+ return [min, max];
306
311
  } else {
307
312
  return transWay(inputValue);
308
313
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.65.0-beta.0",
3
+ "version": "2.65.0",
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.65.0-beta.0",
10
+ "@douyinfe/semi-animation": "2.65.0",
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": "c4da8a4964f48e492a4b5abd668297783a05b5bc",
31
+ "gitHead": "55dccbc8187a9a46884ee5b409975bd3607da6be",
32
32
  "devDependencies": {
33
33
  "@babel/plugin-transform-runtime": "^7.15.8",
34
34
  "@babel/preset-env": "^7.15.8",
@@ -400,7 +400,12 @@ export default class SliderFoundation extends BaseFoundation<SliderAdapter> {
400
400
  })();
401
401
 
402
402
  if (Array.isArray(inputValue)) {
403
- return [transWay(inputValue[0]), transWay(inputValue[1])];
403
+ const min = transWay(inputValue[0]);
404
+ const max = transWay(inputValue[1]);
405
+ if (min > max) {
406
+ return this.getState("focusPos") === "min" ? [max, max] : [min, min];
407
+ }
408
+ return [min, max];
404
409
  } else {
405
410
  return transWay(inputValue);
406
411
  }