@douyinfe/semi-foundation 2.38.2-alpha.2 → 2.38.2-alpha.2-patch-modal
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/button/iconButton.scss +29 -1
- package/lib/cjs/button/iconButton.css +26 -1
- package/lib/cjs/button/iconButton.scss +29 -1
- package/lib/cjs/lib/cjs/_portal/portal.scss +17 -0
- package/lib/cjs/lib/cjs/anchor/anchor.scss +127 -0
- package/lib/cjs/lib/es/_portal/portal.scss +17 -0
- package/lib/cjs/lib/es/anchor/anchor.scss +127 -0
- package/lib/cjs/navigation/subNavFoundation.js +3 -1
- package/lib/cjs/spin/animation.scss +3 -2
- package/lib/cjs/spin/spin.css +19 -1
- package/lib/cjs/spin/spin.scss +20 -0
- package/lib/cjs/tooltip/foundation.d.ts +1 -2
- package/lib/cjs/tooltip/foundation.js +1 -10
- package/lib/cjs/utils/Event.js +1 -3
- package/lib/es/button/iconButton.css +26 -1
- package/lib/es/button/iconButton.scss +29 -1
- package/lib/es/lib/cjs/_portal/portal.scss +17 -0
- package/lib/es/lib/cjs/anchor/anchor.scss +127 -0
- package/lib/es/lib/es/_portal/portal.scss +17 -0
- package/lib/es/lib/es/anchor/anchor.scss +127 -0
- package/lib/es/navigation/subNavFoundation.js +3 -1
- package/lib/es/spin/animation.scss +3 -2
- package/lib/es/spin/spin.css +19 -1
- package/lib/es/spin/spin.scss +20 -0
- package/lib/es/tooltip/foundation.d.ts +1 -2
- package/lib/es/tooltip/foundation.js +1 -10
- package/lib/es/utils/Event.js +1 -3
- package/navigation/subNavFoundation.ts +3 -1
- package/package.json +3 -3
- package/spin/animation.scss +3 -2
- package/spin/spin.scss +20 -0
- package/tooltip/foundation.ts +3 -13
- package/utils/Event.ts +1 -3
package/button/iconButton.scss
CHANGED
|
@@ -4,6 +4,30 @@
|
|
|
4
4
|
$module: #{$prefix}-button;
|
|
5
5
|
|
|
6
6
|
.#{$module} {
|
|
7
|
+
@keyframes #{$prefix}-animation-rotate {
|
|
8
|
+
from {
|
|
9
|
+
transform: rotate(0);
|
|
10
|
+
}
|
|
11
|
+
to {
|
|
12
|
+
transform: rotate(360deg);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@keyframes #{$prefix}-animation-circle {
|
|
17
|
+
0% {
|
|
18
|
+
stroke-dasharray: 1, 220;
|
|
19
|
+
stroke-dashoffset: 0;
|
|
20
|
+
}
|
|
21
|
+
50% {
|
|
22
|
+
stroke-dasharray: 150, 220;
|
|
23
|
+
stroke-dashoffset: -68px;
|
|
24
|
+
}
|
|
25
|
+
100% {
|
|
26
|
+
stroke-dasharray: 150, 220;
|
|
27
|
+
stroke-dashoffset: -218px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
7
31
|
&.#{$module}-with-icon {
|
|
8
32
|
display: inline-flex;
|
|
9
33
|
align-items: center;
|
|
@@ -24,8 +48,12 @@ $module: #{$prefix}-button;
|
|
|
24
48
|
&>svg {
|
|
25
49
|
width: 16px;
|
|
26
50
|
height: 16px;
|
|
27
|
-
animation:
|
|
51
|
+
animation: 1200ms linear infinite #{$prefix}-animation-rotate;
|
|
28
52
|
animation-fill-mode: forwards;
|
|
53
|
+
|
|
54
|
+
& > circle {
|
|
55
|
+
animation: 2500ms ease-in-out infinite #{$prefix}-animation-circle;
|
|
56
|
+
}
|
|
29
57
|
}
|
|
30
58
|
}
|
|
31
59
|
}
|
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
/* shadow */
|
|
2
2
|
/* sizing */
|
|
3
3
|
/* spacing */
|
|
4
|
+
@keyframes semi-animation-rotate {
|
|
5
|
+
from {
|
|
6
|
+
transform: rotate(0);
|
|
7
|
+
}
|
|
8
|
+
to {
|
|
9
|
+
transform: rotate(360deg);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
@keyframes semi-animation-circle {
|
|
13
|
+
0% {
|
|
14
|
+
stroke-dasharray: 1, 220;
|
|
15
|
+
stroke-dashoffset: 0;
|
|
16
|
+
}
|
|
17
|
+
50% {
|
|
18
|
+
stroke-dasharray: 150, 220;
|
|
19
|
+
stroke-dashoffset: -68px;
|
|
20
|
+
}
|
|
21
|
+
100% {
|
|
22
|
+
stroke-dasharray: 150, 220;
|
|
23
|
+
stroke-dashoffset: -218px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
4
26
|
.semi-button.semi-button-with-icon {
|
|
5
27
|
display: inline-flex;
|
|
6
28
|
align-items: center;
|
|
@@ -17,9 +39,12 @@
|
|
|
17
39
|
.semi-button.semi-button-loading .semi-button-content > svg {
|
|
18
40
|
width: 16px;
|
|
19
41
|
height: 16px;
|
|
20
|
-
animation:
|
|
42
|
+
animation: 1200ms linear infinite semi-animation-rotate;
|
|
21
43
|
animation-fill-mode: forwards;
|
|
22
44
|
}
|
|
45
|
+
.semi-button.semi-button-loading .semi-button-content > svg > circle {
|
|
46
|
+
animation: 2500ms ease-in-out infinite semi-animation-circle;
|
|
47
|
+
}
|
|
23
48
|
.semi-button.semi-button-with-icon-only {
|
|
24
49
|
padding-left: 8px;
|
|
25
50
|
padding-right: 8px;
|
|
@@ -4,6 +4,30 @@
|
|
|
4
4
|
$module: #{$prefix}-button;
|
|
5
5
|
|
|
6
6
|
.#{$module} {
|
|
7
|
+
@keyframes #{$prefix}-animation-rotate {
|
|
8
|
+
from {
|
|
9
|
+
transform: rotate(0);
|
|
10
|
+
}
|
|
11
|
+
to {
|
|
12
|
+
transform: rotate(360deg);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@keyframes #{$prefix}-animation-circle {
|
|
17
|
+
0% {
|
|
18
|
+
stroke-dasharray: 1, 220;
|
|
19
|
+
stroke-dashoffset: 0;
|
|
20
|
+
}
|
|
21
|
+
50% {
|
|
22
|
+
stroke-dasharray: 150, 220;
|
|
23
|
+
stroke-dashoffset: -68px;
|
|
24
|
+
}
|
|
25
|
+
100% {
|
|
26
|
+
stroke-dasharray: 150, 220;
|
|
27
|
+
stroke-dashoffset: -218px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
7
31
|
&.#{$module}-with-icon {
|
|
8
32
|
display: inline-flex;
|
|
9
33
|
align-items: center;
|
|
@@ -24,8 +48,12 @@ $module: #{$prefix}-button;
|
|
|
24
48
|
&>svg {
|
|
25
49
|
width: 16px;
|
|
26
50
|
height: 16px;
|
|
27
|
-
animation:
|
|
51
|
+
animation: 1200ms linear infinite #{$prefix}-animation-rotate;
|
|
28
52
|
animation-fill-mode: forwards;
|
|
53
|
+
|
|
54
|
+
& > circle {
|
|
55
|
+
animation: 2500ms ease-in-out infinite #{$prefix}-animation-circle;
|
|
56
|
+
}
|
|
29
57
|
}
|
|
30
58
|
}
|
|
31
59
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//@import '../theme/variables.scss';
|
|
2
|
+
|
|
3
|
+
$module: #{$prefix}-portal;
|
|
4
|
+
|
|
5
|
+
.#{$module} {
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 0;
|
|
8
|
+
left: 0;
|
|
9
|
+
width: 100%;
|
|
10
|
+
z-index: $z-portal;
|
|
11
|
+
|
|
12
|
+
&-inner {
|
|
13
|
+
position: absolute;
|
|
14
|
+
background-color: transparent;
|
|
15
|
+
min-width: max-content;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
@import "./animation.scss";
|
|
2
|
+
@import './variables.scss';
|
|
3
|
+
|
|
4
|
+
$module: #{$prefix}-anchor;
|
|
5
|
+
|
|
6
|
+
.#{$module} {
|
|
7
|
+
@include font-size-regular;
|
|
8
|
+
overflow-y: auto;
|
|
9
|
+
overflow-x: hidden;
|
|
10
|
+
position: relative;
|
|
11
|
+
|
|
12
|
+
&-size-small {
|
|
13
|
+
@include font-size-small;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-slide {
|
|
17
|
+
position: absolute;
|
|
18
|
+
left: $spacing-anchor_slide-left;
|
|
19
|
+
top: $spacing-anchor_slide-top;
|
|
20
|
+
height: 100%;
|
|
21
|
+
|
|
22
|
+
&-muted {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&-bar {
|
|
27
|
+
display: none;
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 0;
|
|
30
|
+
width: $width-anchor_slide_default;
|
|
31
|
+
border-radius: $radius-anchor_slide;
|
|
32
|
+
|
|
33
|
+
&-active {
|
|
34
|
+
display: inline-block;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&-default {
|
|
38
|
+
height: $height-anchor_slide_default + 2 * $spacing-anchor_slide_default-Y;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&-small {
|
|
42
|
+
height: $height-anchor_slide_small + 2 * $spacing-anchor_slide_small-Y;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&-primary {
|
|
46
|
+
background-color: $color-anchor_slide_primary-bg-active;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&-tertiary {
|
|
50
|
+
background-color: $color-anchor_slide_tertiary-bg-active;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&::before {
|
|
55
|
+
position: absolute;
|
|
56
|
+
display: block;
|
|
57
|
+
width: $width-anchor_slide_default;
|
|
58
|
+
height: 100%;
|
|
59
|
+
background-color: $color-anchor_slide_default-bg-default;
|
|
60
|
+
border-radius: $radius-anchor_slide;
|
|
61
|
+
content: ' ';
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&-link {
|
|
66
|
+
|
|
67
|
+
&-title {
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
color: $color-anchor_title-text-default;
|
|
70
|
+
padding-top: $spacing-anchor_link_title-paddingTop;
|
|
71
|
+
padding-bottom: $spacing-anchor_link_title-paddingBottom;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
text-overflow: ellipsis;
|
|
74
|
+
white-space: nowrap;
|
|
75
|
+
border-radius: $width-anchor-outline_border_radius;
|
|
76
|
+
transition: color $transition_duration-anchor_title-text $transition_function-anchor_title-text $transition_delay-anchor_title-text;//锚点选项文字的动效
|
|
77
|
+
transform: scale($transform_scale-anchor_title-text);
|
|
78
|
+
&:hover {
|
|
79
|
+
color: $color-anchor_title-text-hover;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&-active {
|
|
83
|
+
color: $color-anchor_title-text-active;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&:focus-visible {
|
|
87
|
+
outline: $width-anchor-outline solid $color-anchor_title-outline-focus;
|
|
88
|
+
outline-offset: $width-anchor-outlineOffset;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&-disabled {
|
|
92
|
+
color: $color-anchor_title-text-disabled;
|
|
93
|
+
cursor: not-allowed;
|
|
94
|
+
&:hover {
|
|
95
|
+
color: $color-anchor_title-text-disabled;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&-tooltip {
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
color: $color-anchor_title-text-default !important;
|
|
103
|
+
|
|
104
|
+
&-small {
|
|
105
|
+
@include font-size-small;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&:hover {
|
|
109
|
+
color: $color-anchor_title-text-hover !important;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&-active {
|
|
113
|
+
color: $color-anchor_title-text-active !important;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&-disabled {
|
|
117
|
+
color: $color-anchor_title-text-disabled !important;
|
|
118
|
+
cursor: not-allowed;
|
|
119
|
+
&:hover {
|
|
120
|
+
color: $color-anchor_title-text-disabled !important;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@import "./rtl.scss";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//@import '../theme/variables.scss';
|
|
2
|
+
|
|
3
|
+
$module: #{$prefix}-portal;
|
|
4
|
+
|
|
5
|
+
.#{$module} {
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 0;
|
|
8
|
+
left: 0;
|
|
9
|
+
width: 100%;
|
|
10
|
+
z-index: $z-portal;
|
|
11
|
+
|
|
12
|
+
&-inner {
|
|
13
|
+
position: absolute;
|
|
14
|
+
background-color: transparent;
|
|
15
|
+
min-width: max-content;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
@import "./animation.scss";
|
|
2
|
+
@import './variables.scss';
|
|
3
|
+
|
|
4
|
+
$module: #{$prefix}-anchor;
|
|
5
|
+
|
|
6
|
+
.#{$module} {
|
|
7
|
+
@include font-size-regular;
|
|
8
|
+
overflow-y: auto;
|
|
9
|
+
overflow-x: hidden;
|
|
10
|
+
position: relative;
|
|
11
|
+
|
|
12
|
+
&-size-small {
|
|
13
|
+
@include font-size-small;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-slide {
|
|
17
|
+
position: absolute;
|
|
18
|
+
left: $spacing-anchor_slide-left;
|
|
19
|
+
top: $spacing-anchor_slide-top;
|
|
20
|
+
height: 100%;
|
|
21
|
+
|
|
22
|
+
&-muted {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&-bar {
|
|
27
|
+
display: none;
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 0;
|
|
30
|
+
width: $width-anchor_slide_default;
|
|
31
|
+
border-radius: $radius-anchor_slide;
|
|
32
|
+
|
|
33
|
+
&-active {
|
|
34
|
+
display: inline-block;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&-default {
|
|
38
|
+
height: $height-anchor_slide_default + 2 * $spacing-anchor_slide_default-Y;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&-small {
|
|
42
|
+
height: $height-anchor_slide_small + 2 * $spacing-anchor_slide_small-Y;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&-primary {
|
|
46
|
+
background-color: $color-anchor_slide_primary-bg-active;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&-tertiary {
|
|
50
|
+
background-color: $color-anchor_slide_tertiary-bg-active;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&::before {
|
|
55
|
+
position: absolute;
|
|
56
|
+
display: block;
|
|
57
|
+
width: $width-anchor_slide_default;
|
|
58
|
+
height: 100%;
|
|
59
|
+
background-color: $color-anchor_slide_default-bg-default;
|
|
60
|
+
border-radius: $radius-anchor_slide;
|
|
61
|
+
content: ' ';
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&-link {
|
|
66
|
+
|
|
67
|
+
&-title {
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
color: $color-anchor_title-text-default;
|
|
70
|
+
padding-top: $spacing-anchor_link_title-paddingTop;
|
|
71
|
+
padding-bottom: $spacing-anchor_link_title-paddingBottom;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
text-overflow: ellipsis;
|
|
74
|
+
white-space: nowrap;
|
|
75
|
+
border-radius: $width-anchor-outline_border_radius;
|
|
76
|
+
transition: color $transition_duration-anchor_title-text $transition_function-anchor_title-text $transition_delay-anchor_title-text;//锚点选项文字的动效
|
|
77
|
+
transform: scale($transform_scale-anchor_title-text);
|
|
78
|
+
&:hover {
|
|
79
|
+
color: $color-anchor_title-text-hover;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&-active {
|
|
83
|
+
color: $color-anchor_title-text-active;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&:focus-visible {
|
|
87
|
+
outline: $width-anchor-outline solid $color-anchor_title-outline-focus;
|
|
88
|
+
outline-offset: $width-anchor-outlineOffset;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&-disabled {
|
|
92
|
+
color: $color-anchor_title-text-disabled;
|
|
93
|
+
cursor: not-allowed;
|
|
94
|
+
&:hover {
|
|
95
|
+
color: $color-anchor_title-text-disabled;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&-tooltip {
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
color: $color-anchor_title-text-default !important;
|
|
103
|
+
|
|
104
|
+
&-small {
|
|
105
|
+
@include font-size-small;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&:hover {
|
|
109
|
+
color: $color-anchor_title-text-hover !important;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&-active {
|
|
113
|
+
color: $color-anchor_title-text-active !important;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&-disabled {
|
|
117
|
+
color: $color-anchor_title-text-disabled !important;
|
|
118
|
+
cursor: not-allowed;
|
|
119
|
+
&:hover {
|
|
120
|
+
color: $color-anchor_title-text-disabled !important;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@import "./rtl.scss";
|
|
@@ -33,7 +33,9 @@ class SubNavFoundation extends _foundation.default {
|
|
|
33
33
|
// this.log('invoke SubNavFoundation init()');
|
|
34
34
|
this._timer = null;
|
|
35
35
|
}
|
|
36
|
-
destroy() {
|
|
36
|
+
destroy() {
|
|
37
|
+
this.clearDelayTimer();
|
|
38
|
+
}
|
|
37
39
|
clearDelayTimer() {
|
|
38
40
|
if (this._timer) {
|
|
39
41
|
clearTimeout(this._timer);
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
$animation_duration-spin_wrapper-spin:
|
|
2
|
-
$animation_duration-spin_customChildren-spin: 1600ms; // 自定义指示器时旋转一周时长
|
|
1
|
+
$animation_duration-spin_wrapper-spin: 1200ms; // 加载图标容器旋转一周时长
|
|
2
|
+
$animation_duration-spin_customChildren-spin: 1600ms; // 自定义指示器时旋转一周时长
|
|
3
|
+
$animation_duration-spin_wrapper-spin-circle: 2500ms; // 加载图标弹性运动一周时长
|
package/lib/cjs/spin/spin.css
CHANGED
|
@@ -15,6 +15,20 @@
|
|
|
15
15
|
transform: rotate(360deg);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
@keyframes semi-animation-circle {
|
|
19
|
+
0% {
|
|
20
|
+
stroke-dasharray: 1, 220;
|
|
21
|
+
stroke-dashoffset: 0;
|
|
22
|
+
}
|
|
23
|
+
50% {
|
|
24
|
+
stroke-dasharray: 150, 220;
|
|
25
|
+
stroke-dashoffset: -68px;
|
|
26
|
+
}
|
|
27
|
+
100% {
|
|
28
|
+
stroke-dasharray: 150, 220;
|
|
29
|
+
stroke-dashoffset: -218px;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
18
32
|
.semi-spin-wrapper {
|
|
19
33
|
text-align: center;
|
|
20
34
|
position: absolute;
|
|
@@ -24,12 +38,16 @@
|
|
|
24
38
|
color: var(--semi-color-primary);
|
|
25
39
|
}
|
|
26
40
|
.semi-spin-wrapper > svg {
|
|
27
|
-
|
|
41
|
+
display: inline;
|
|
42
|
+
animation: 1200ms linear infinite semi-animation-rotate;
|
|
28
43
|
animation-fill-mode: forwards;
|
|
29
44
|
vertical-align: top;
|
|
30
45
|
width: 20px;
|
|
31
46
|
height: 20px;
|
|
32
47
|
}
|
|
48
|
+
.semi-spin-wrapper > svg > circle {
|
|
49
|
+
animation: 2500ms ease-in-out infinite semi-animation-circle;
|
|
50
|
+
}
|
|
33
51
|
.semi-spin-animate {
|
|
34
52
|
display: inline-flex;
|
|
35
53
|
animation: 1600ms linear infinite semi-animation-rotate;
|
package/lib/cjs/spin/spin.scss
CHANGED
|
@@ -18,6 +18,21 @@ $module: #{$prefix}-spin;
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
@keyframes #{$prefix}-animation-circle {
|
|
22
|
+
0% {
|
|
23
|
+
stroke-dasharray: 1, 220;
|
|
24
|
+
stroke-dashoffset: 0;
|
|
25
|
+
}
|
|
26
|
+
50% {
|
|
27
|
+
stroke-dasharray: 150, 220;
|
|
28
|
+
stroke-dashoffset: -68px;
|
|
29
|
+
}
|
|
30
|
+
100% {
|
|
31
|
+
stroke-dasharray: 150, 220;
|
|
32
|
+
stroke-dashoffset: -218px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
21
36
|
&-wrapper {
|
|
22
37
|
text-align: center;
|
|
23
38
|
position: absolute;
|
|
@@ -27,10 +42,15 @@ $module: #{$prefix}-spin;
|
|
|
27
42
|
color: $color-spin-bg;
|
|
28
43
|
|
|
29
44
|
& > svg {
|
|
45
|
+
display: inline;
|
|
30
46
|
animation: $animation_duration-spin_wrapper-spin linear infinite #{$prefix}-animation-rotate;
|
|
31
47
|
animation-fill-mode: forwards;
|
|
32
48
|
vertical-align: top;
|
|
33
49
|
@include size($width-spin_middle);
|
|
50
|
+
|
|
51
|
+
& > circle {
|
|
52
|
+
animation: $animation_duration-spin_wrapper-spin-circle ease-in-out infinite #{$prefix}-animation-circle;
|
|
53
|
+
}
|
|
34
54
|
}
|
|
35
55
|
}
|
|
36
56
|
|
|
@@ -10,7 +10,7 @@ export interface TooltipAdapter<P = Record<string, any>, S = Record<string, any>
|
|
|
10
10
|
notifyVisibleChange(isVisible: any): void;
|
|
11
11
|
getPopupContainerRect(): PopupContainerDOMRect;
|
|
12
12
|
containerIsBody(): boolean;
|
|
13
|
-
off(arg0: string
|
|
13
|
+
off(arg0: string): void;
|
|
14
14
|
canMotion(): boolean;
|
|
15
15
|
registerScrollHandler(arg: () => Record<string, any>): void;
|
|
16
16
|
unregisterScrollHandler(): void;
|
|
@@ -47,7 +47,6 @@ export interface TooltipAdapter<P = Record<string, any>, S = Record<string, any>
|
|
|
47
47
|
notifyEscKeydown(event: any): void;
|
|
48
48
|
getTriggerNode(): any;
|
|
49
49
|
setId(): void;
|
|
50
|
-
getTriggerDOM(): HTMLElement | null;
|
|
51
50
|
}
|
|
52
51
|
export type Position = ArrayElement<typeof strings.POSITION_SET>;
|
|
53
52
|
export interface PopupContainerDOMRect extends DOMRectLikeType {
|
|
@@ -58,16 +58,6 @@ class Tooltip extends _foundation.default {
|
|
|
58
58
|
this.show = () => {
|
|
59
59
|
const content = this.getProp('content');
|
|
60
60
|
const trigger = this.getProp('trigger');
|
|
61
|
-
if (trigger === "hover") {
|
|
62
|
-
const checkTriggerIsHover = () => {
|
|
63
|
-
const triggerDOM = this._adapter.getTriggerDOM();
|
|
64
|
-
if (trigger && !triggerDOM.matches(":hover")) {
|
|
65
|
-
this.hide();
|
|
66
|
-
}
|
|
67
|
-
this._adapter.off("portalInserted", checkTriggerIsHover);
|
|
68
|
-
};
|
|
69
|
-
this._adapter.on('portalInserted', checkTriggerIsHover);
|
|
70
|
-
}
|
|
71
61
|
const clickTriggerToHide = this.getProp('clickTriggerToHide');
|
|
72
62
|
const {
|
|
73
63
|
visible,
|
|
@@ -245,6 +235,7 @@ class Tooltip extends _foundation.default {
|
|
|
245
235
|
this._adapter.unregisterClickOutsideHandler();
|
|
246
236
|
this.unBindResizeEvent();
|
|
247
237
|
this.unBindScrollEvent();
|
|
238
|
+
clearTimeout(this._timer);
|
|
248
239
|
}
|
|
249
240
|
_bindTriggerEvent(triggerEventSet) {
|
|
250
241
|
this._adapter.registerTriggerEvent(triggerEventSet);
|
package/lib/cjs/utils/Event.js
CHANGED
|
@@ -51,9 +51,7 @@ class Event {
|
|
|
51
51
|
if (!this._eventMap.has(event)) {
|
|
52
52
|
return false;
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
// clone to avoid someone writing the logic of deleting callback in callbacks into his or her callback code, for example the once func above
|
|
56
|
-
callbacks.forEach(callback => callback(...args));
|
|
54
|
+
this._eventMap.get(event).forEach(callback => callback(...args));
|
|
57
55
|
return true;
|
|
58
56
|
}
|
|
59
57
|
}
|
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
/* shadow */
|
|
2
2
|
/* sizing */
|
|
3
3
|
/* spacing */
|
|
4
|
+
@keyframes semi-animation-rotate {
|
|
5
|
+
from {
|
|
6
|
+
transform: rotate(0);
|
|
7
|
+
}
|
|
8
|
+
to {
|
|
9
|
+
transform: rotate(360deg);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
@keyframes semi-animation-circle {
|
|
13
|
+
0% {
|
|
14
|
+
stroke-dasharray: 1, 220;
|
|
15
|
+
stroke-dashoffset: 0;
|
|
16
|
+
}
|
|
17
|
+
50% {
|
|
18
|
+
stroke-dasharray: 150, 220;
|
|
19
|
+
stroke-dashoffset: -68px;
|
|
20
|
+
}
|
|
21
|
+
100% {
|
|
22
|
+
stroke-dasharray: 150, 220;
|
|
23
|
+
stroke-dashoffset: -218px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
4
26
|
.semi-button.semi-button-with-icon {
|
|
5
27
|
display: inline-flex;
|
|
6
28
|
align-items: center;
|
|
@@ -17,9 +39,12 @@
|
|
|
17
39
|
.semi-button.semi-button-loading .semi-button-content > svg {
|
|
18
40
|
width: 16px;
|
|
19
41
|
height: 16px;
|
|
20
|
-
animation:
|
|
42
|
+
animation: 1200ms linear infinite semi-animation-rotate;
|
|
21
43
|
animation-fill-mode: forwards;
|
|
22
44
|
}
|
|
45
|
+
.semi-button.semi-button-loading .semi-button-content > svg > circle {
|
|
46
|
+
animation: 2500ms ease-in-out infinite semi-animation-circle;
|
|
47
|
+
}
|
|
23
48
|
.semi-button.semi-button-with-icon-only {
|
|
24
49
|
padding-left: 8px;
|
|
25
50
|
padding-right: 8px;
|
|
@@ -4,6 +4,30 @@
|
|
|
4
4
|
$module: #{$prefix}-button;
|
|
5
5
|
|
|
6
6
|
.#{$module} {
|
|
7
|
+
@keyframes #{$prefix}-animation-rotate {
|
|
8
|
+
from {
|
|
9
|
+
transform: rotate(0);
|
|
10
|
+
}
|
|
11
|
+
to {
|
|
12
|
+
transform: rotate(360deg);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@keyframes #{$prefix}-animation-circle {
|
|
17
|
+
0% {
|
|
18
|
+
stroke-dasharray: 1, 220;
|
|
19
|
+
stroke-dashoffset: 0;
|
|
20
|
+
}
|
|
21
|
+
50% {
|
|
22
|
+
stroke-dasharray: 150, 220;
|
|
23
|
+
stroke-dashoffset: -68px;
|
|
24
|
+
}
|
|
25
|
+
100% {
|
|
26
|
+
stroke-dasharray: 150, 220;
|
|
27
|
+
stroke-dashoffset: -218px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
7
31
|
&.#{$module}-with-icon {
|
|
8
32
|
display: inline-flex;
|
|
9
33
|
align-items: center;
|
|
@@ -24,8 +48,12 @@ $module: #{$prefix}-button;
|
|
|
24
48
|
&>svg {
|
|
25
49
|
width: 16px;
|
|
26
50
|
height: 16px;
|
|
27
|
-
animation:
|
|
51
|
+
animation: 1200ms linear infinite #{$prefix}-animation-rotate;
|
|
28
52
|
animation-fill-mode: forwards;
|
|
53
|
+
|
|
54
|
+
& > circle {
|
|
55
|
+
animation: 2500ms ease-in-out infinite #{$prefix}-animation-circle;
|
|
56
|
+
}
|
|
29
57
|
}
|
|
30
58
|
}
|
|
31
59
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//@import '../theme/variables.scss';
|
|
2
|
+
|
|
3
|
+
$module: #{$prefix}-portal;
|
|
4
|
+
|
|
5
|
+
.#{$module} {
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 0;
|
|
8
|
+
left: 0;
|
|
9
|
+
width: 100%;
|
|
10
|
+
z-index: $z-portal;
|
|
11
|
+
|
|
12
|
+
&-inner {
|
|
13
|
+
position: absolute;
|
|
14
|
+
background-color: transparent;
|
|
15
|
+
min-width: max-content;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
@import "./animation.scss";
|
|
2
|
+
@import './variables.scss';
|
|
3
|
+
|
|
4
|
+
$module: #{$prefix}-anchor;
|
|
5
|
+
|
|
6
|
+
.#{$module} {
|
|
7
|
+
@include font-size-regular;
|
|
8
|
+
overflow-y: auto;
|
|
9
|
+
overflow-x: hidden;
|
|
10
|
+
position: relative;
|
|
11
|
+
|
|
12
|
+
&-size-small {
|
|
13
|
+
@include font-size-small;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-slide {
|
|
17
|
+
position: absolute;
|
|
18
|
+
left: $spacing-anchor_slide-left;
|
|
19
|
+
top: $spacing-anchor_slide-top;
|
|
20
|
+
height: 100%;
|
|
21
|
+
|
|
22
|
+
&-muted {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&-bar {
|
|
27
|
+
display: none;
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 0;
|
|
30
|
+
width: $width-anchor_slide_default;
|
|
31
|
+
border-radius: $radius-anchor_slide;
|
|
32
|
+
|
|
33
|
+
&-active {
|
|
34
|
+
display: inline-block;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&-default {
|
|
38
|
+
height: $height-anchor_slide_default + 2 * $spacing-anchor_slide_default-Y;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&-small {
|
|
42
|
+
height: $height-anchor_slide_small + 2 * $spacing-anchor_slide_small-Y;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&-primary {
|
|
46
|
+
background-color: $color-anchor_slide_primary-bg-active;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&-tertiary {
|
|
50
|
+
background-color: $color-anchor_slide_tertiary-bg-active;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&::before {
|
|
55
|
+
position: absolute;
|
|
56
|
+
display: block;
|
|
57
|
+
width: $width-anchor_slide_default;
|
|
58
|
+
height: 100%;
|
|
59
|
+
background-color: $color-anchor_slide_default-bg-default;
|
|
60
|
+
border-radius: $radius-anchor_slide;
|
|
61
|
+
content: ' ';
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&-link {
|
|
66
|
+
|
|
67
|
+
&-title {
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
color: $color-anchor_title-text-default;
|
|
70
|
+
padding-top: $spacing-anchor_link_title-paddingTop;
|
|
71
|
+
padding-bottom: $spacing-anchor_link_title-paddingBottom;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
text-overflow: ellipsis;
|
|
74
|
+
white-space: nowrap;
|
|
75
|
+
border-radius: $width-anchor-outline_border_radius;
|
|
76
|
+
transition: color $transition_duration-anchor_title-text $transition_function-anchor_title-text $transition_delay-anchor_title-text;//锚点选项文字的动效
|
|
77
|
+
transform: scale($transform_scale-anchor_title-text);
|
|
78
|
+
&:hover {
|
|
79
|
+
color: $color-anchor_title-text-hover;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&-active {
|
|
83
|
+
color: $color-anchor_title-text-active;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&:focus-visible {
|
|
87
|
+
outline: $width-anchor-outline solid $color-anchor_title-outline-focus;
|
|
88
|
+
outline-offset: $width-anchor-outlineOffset;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&-disabled {
|
|
92
|
+
color: $color-anchor_title-text-disabled;
|
|
93
|
+
cursor: not-allowed;
|
|
94
|
+
&:hover {
|
|
95
|
+
color: $color-anchor_title-text-disabled;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&-tooltip {
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
color: $color-anchor_title-text-default !important;
|
|
103
|
+
|
|
104
|
+
&-small {
|
|
105
|
+
@include font-size-small;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&:hover {
|
|
109
|
+
color: $color-anchor_title-text-hover !important;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&-active {
|
|
113
|
+
color: $color-anchor_title-text-active !important;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&-disabled {
|
|
117
|
+
color: $color-anchor_title-text-disabled !important;
|
|
118
|
+
cursor: not-allowed;
|
|
119
|
+
&:hover {
|
|
120
|
+
color: $color-anchor_title-text-disabled !important;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@import "./rtl.scss";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//@import '../theme/variables.scss';
|
|
2
|
+
|
|
3
|
+
$module: #{$prefix}-portal;
|
|
4
|
+
|
|
5
|
+
.#{$module} {
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 0;
|
|
8
|
+
left: 0;
|
|
9
|
+
width: 100%;
|
|
10
|
+
z-index: $z-portal;
|
|
11
|
+
|
|
12
|
+
&-inner {
|
|
13
|
+
position: absolute;
|
|
14
|
+
background-color: transparent;
|
|
15
|
+
min-width: max-content;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
@import "./animation.scss";
|
|
2
|
+
@import './variables.scss';
|
|
3
|
+
|
|
4
|
+
$module: #{$prefix}-anchor;
|
|
5
|
+
|
|
6
|
+
.#{$module} {
|
|
7
|
+
@include font-size-regular;
|
|
8
|
+
overflow-y: auto;
|
|
9
|
+
overflow-x: hidden;
|
|
10
|
+
position: relative;
|
|
11
|
+
|
|
12
|
+
&-size-small {
|
|
13
|
+
@include font-size-small;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-slide {
|
|
17
|
+
position: absolute;
|
|
18
|
+
left: $spacing-anchor_slide-left;
|
|
19
|
+
top: $spacing-anchor_slide-top;
|
|
20
|
+
height: 100%;
|
|
21
|
+
|
|
22
|
+
&-muted {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&-bar {
|
|
27
|
+
display: none;
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 0;
|
|
30
|
+
width: $width-anchor_slide_default;
|
|
31
|
+
border-radius: $radius-anchor_slide;
|
|
32
|
+
|
|
33
|
+
&-active {
|
|
34
|
+
display: inline-block;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&-default {
|
|
38
|
+
height: $height-anchor_slide_default + 2 * $spacing-anchor_slide_default-Y;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&-small {
|
|
42
|
+
height: $height-anchor_slide_small + 2 * $spacing-anchor_slide_small-Y;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&-primary {
|
|
46
|
+
background-color: $color-anchor_slide_primary-bg-active;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&-tertiary {
|
|
50
|
+
background-color: $color-anchor_slide_tertiary-bg-active;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&::before {
|
|
55
|
+
position: absolute;
|
|
56
|
+
display: block;
|
|
57
|
+
width: $width-anchor_slide_default;
|
|
58
|
+
height: 100%;
|
|
59
|
+
background-color: $color-anchor_slide_default-bg-default;
|
|
60
|
+
border-radius: $radius-anchor_slide;
|
|
61
|
+
content: ' ';
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&-link {
|
|
66
|
+
|
|
67
|
+
&-title {
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
color: $color-anchor_title-text-default;
|
|
70
|
+
padding-top: $spacing-anchor_link_title-paddingTop;
|
|
71
|
+
padding-bottom: $spacing-anchor_link_title-paddingBottom;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
text-overflow: ellipsis;
|
|
74
|
+
white-space: nowrap;
|
|
75
|
+
border-radius: $width-anchor-outline_border_radius;
|
|
76
|
+
transition: color $transition_duration-anchor_title-text $transition_function-anchor_title-text $transition_delay-anchor_title-text;//锚点选项文字的动效
|
|
77
|
+
transform: scale($transform_scale-anchor_title-text);
|
|
78
|
+
&:hover {
|
|
79
|
+
color: $color-anchor_title-text-hover;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&-active {
|
|
83
|
+
color: $color-anchor_title-text-active;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&:focus-visible {
|
|
87
|
+
outline: $width-anchor-outline solid $color-anchor_title-outline-focus;
|
|
88
|
+
outline-offset: $width-anchor-outlineOffset;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&-disabled {
|
|
92
|
+
color: $color-anchor_title-text-disabled;
|
|
93
|
+
cursor: not-allowed;
|
|
94
|
+
&:hover {
|
|
95
|
+
color: $color-anchor_title-text-disabled;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&-tooltip {
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
color: $color-anchor_title-text-default !important;
|
|
103
|
+
|
|
104
|
+
&-small {
|
|
105
|
+
@include font-size-small;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&:hover {
|
|
109
|
+
color: $color-anchor_title-text-hover !important;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&-active {
|
|
113
|
+
color: $color-anchor_title-text-active !important;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&-disabled {
|
|
117
|
+
color: $color-anchor_title-text-disabled !important;
|
|
118
|
+
cursor: not-allowed;
|
|
119
|
+
&:hover {
|
|
120
|
+
color: $color-anchor_title-text-disabled !important;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@import "./rtl.scss";
|
|
@@ -26,7 +26,9 @@ export default class SubNavFoundation extends BaseFoundation {
|
|
|
26
26
|
// this.log('invoke SubNavFoundation init()');
|
|
27
27
|
this._timer = null;
|
|
28
28
|
}
|
|
29
|
-
destroy() {
|
|
29
|
+
destroy() {
|
|
30
|
+
this.clearDelayTimer();
|
|
31
|
+
}
|
|
30
32
|
clearDelayTimer() {
|
|
31
33
|
if (this._timer) {
|
|
32
34
|
clearTimeout(this._timer);
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
$animation_duration-spin_wrapper-spin:
|
|
2
|
-
$animation_duration-spin_customChildren-spin: 1600ms; // 自定义指示器时旋转一周时长
|
|
1
|
+
$animation_duration-spin_wrapper-spin: 1200ms; // 加载图标容器旋转一周时长
|
|
2
|
+
$animation_duration-spin_customChildren-spin: 1600ms; // 自定义指示器时旋转一周时长
|
|
3
|
+
$animation_duration-spin_wrapper-spin-circle: 2500ms; // 加载图标弹性运动一周时长
|
package/lib/es/spin/spin.css
CHANGED
|
@@ -15,6 +15,20 @@
|
|
|
15
15
|
transform: rotate(360deg);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
@keyframes semi-animation-circle {
|
|
19
|
+
0% {
|
|
20
|
+
stroke-dasharray: 1, 220;
|
|
21
|
+
stroke-dashoffset: 0;
|
|
22
|
+
}
|
|
23
|
+
50% {
|
|
24
|
+
stroke-dasharray: 150, 220;
|
|
25
|
+
stroke-dashoffset: -68px;
|
|
26
|
+
}
|
|
27
|
+
100% {
|
|
28
|
+
stroke-dasharray: 150, 220;
|
|
29
|
+
stroke-dashoffset: -218px;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
18
32
|
.semi-spin-wrapper {
|
|
19
33
|
text-align: center;
|
|
20
34
|
position: absolute;
|
|
@@ -24,12 +38,16 @@
|
|
|
24
38
|
color: var(--semi-color-primary);
|
|
25
39
|
}
|
|
26
40
|
.semi-spin-wrapper > svg {
|
|
27
|
-
|
|
41
|
+
display: inline;
|
|
42
|
+
animation: 1200ms linear infinite semi-animation-rotate;
|
|
28
43
|
animation-fill-mode: forwards;
|
|
29
44
|
vertical-align: top;
|
|
30
45
|
width: 20px;
|
|
31
46
|
height: 20px;
|
|
32
47
|
}
|
|
48
|
+
.semi-spin-wrapper > svg > circle {
|
|
49
|
+
animation: 2500ms ease-in-out infinite semi-animation-circle;
|
|
50
|
+
}
|
|
33
51
|
.semi-spin-animate {
|
|
34
52
|
display: inline-flex;
|
|
35
53
|
animation: 1600ms linear infinite semi-animation-rotate;
|
package/lib/es/spin/spin.scss
CHANGED
|
@@ -18,6 +18,21 @@ $module: #{$prefix}-spin;
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
@keyframes #{$prefix}-animation-circle {
|
|
22
|
+
0% {
|
|
23
|
+
stroke-dasharray: 1, 220;
|
|
24
|
+
stroke-dashoffset: 0;
|
|
25
|
+
}
|
|
26
|
+
50% {
|
|
27
|
+
stroke-dasharray: 150, 220;
|
|
28
|
+
stroke-dashoffset: -68px;
|
|
29
|
+
}
|
|
30
|
+
100% {
|
|
31
|
+
stroke-dasharray: 150, 220;
|
|
32
|
+
stroke-dashoffset: -218px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
21
36
|
&-wrapper {
|
|
22
37
|
text-align: center;
|
|
23
38
|
position: absolute;
|
|
@@ -27,10 +42,15 @@ $module: #{$prefix}-spin;
|
|
|
27
42
|
color: $color-spin-bg;
|
|
28
43
|
|
|
29
44
|
& > svg {
|
|
45
|
+
display: inline;
|
|
30
46
|
animation: $animation_duration-spin_wrapper-spin linear infinite #{$prefix}-animation-rotate;
|
|
31
47
|
animation-fill-mode: forwards;
|
|
32
48
|
vertical-align: top;
|
|
33
49
|
@include size($width-spin_middle);
|
|
50
|
+
|
|
51
|
+
& > circle {
|
|
52
|
+
animation: $animation_duration-spin_wrapper-spin-circle ease-in-out infinite #{$prefix}-animation-circle;
|
|
53
|
+
}
|
|
34
54
|
}
|
|
35
55
|
}
|
|
36
56
|
|
|
@@ -10,7 +10,7 @@ export interface TooltipAdapter<P = Record<string, any>, S = Record<string, any>
|
|
|
10
10
|
notifyVisibleChange(isVisible: any): void;
|
|
11
11
|
getPopupContainerRect(): PopupContainerDOMRect;
|
|
12
12
|
containerIsBody(): boolean;
|
|
13
|
-
off(arg0: string
|
|
13
|
+
off(arg0: string): void;
|
|
14
14
|
canMotion(): boolean;
|
|
15
15
|
registerScrollHandler(arg: () => Record<string, any>): void;
|
|
16
16
|
unregisterScrollHandler(): void;
|
|
@@ -47,7 +47,6 @@ export interface TooltipAdapter<P = Record<string, any>, S = Record<string, any>
|
|
|
47
47
|
notifyEscKeydown(event: any): void;
|
|
48
48
|
getTriggerNode(): any;
|
|
49
49
|
setId(): void;
|
|
50
|
-
getTriggerDOM(): HTMLElement | null;
|
|
51
50
|
}
|
|
52
51
|
export type Position = ArrayElement<typeof strings.POSITION_SET>;
|
|
53
52
|
export interface PopupContainerDOMRect extends DOMRectLikeType {
|
|
@@ -50,16 +50,6 @@ export default class Tooltip extends BaseFoundation {
|
|
|
50
50
|
this.show = () => {
|
|
51
51
|
const content = this.getProp('content');
|
|
52
52
|
const trigger = this.getProp('trigger');
|
|
53
|
-
if (trigger === "hover") {
|
|
54
|
-
const checkTriggerIsHover = () => {
|
|
55
|
-
const triggerDOM = this._adapter.getTriggerDOM();
|
|
56
|
-
if (trigger && !triggerDOM.matches(":hover")) {
|
|
57
|
-
this.hide();
|
|
58
|
-
}
|
|
59
|
-
this._adapter.off("portalInserted", checkTriggerIsHover);
|
|
60
|
-
};
|
|
61
|
-
this._adapter.on('portalInserted', checkTriggerIsHover);
|
|
62
|
-
}
|
|
63
53
|
const clickTriggerToHide = this.getProp('clickTriggerToHide');
|
|
64
54
|
const {
|
|
65
55
|
visible,
|
|
@@ -237,6 +227,7 @@ export default class Tooltip extends BaseFoundation {
|
|
|
237
227
|
this._adapter.unregisterClickOutsideHandler();
|
|
238
228
|
this.unBindResizeEvent();
|
|
239
229
|
this.unBindScrollEvent();
|
|
230
|
+
clearTimeout(this._timer);
|
|
240
231
|
}
|
|
241
232
|
_bindTriggerEvent(triggerEventSet) {
|
|
242
233
|
this._adapter.registerTriggerEvent(triggerEventSet);
|
package/lib/es/utils/Event.js
CHANGED
|
@@ -44,9 +44,7 @@ export default class Event {
|
|
|
44
44
|
if (!this._eventMap.has(event)) {
|
|
45
45
|
return false;
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
// clone to avoid someone writing the logic of deleting callback in callbacks into his or her callback code, for example the once func above
|
|
49
|
-
callbacks.forEach(callback => callback(...args));
|
|
47
|
+
this._eventMap.get(event).forEach(callback => callback(...args));
|
|
50
48
|
return true;
|
|
51
49
|
}
|
|
52
50
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.38.2-alpha.2",
|
|
3
|
+
"version": "2.38.2-alpha.2-patch-modal",
|
|
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.38.2-alpha.2",
|
|
10
|
+
"@douyinfe/semi-animation": "2.38.2-alpha.2-patch-modal",
|
|
11
11
|
"async-validator": "^3.5.0",
|
|
12
12
|
"classnames": "^2.2.6",
|
|
13
13
|
"date-fns": "^2.29.3",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"*.scss",
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "0b01c3ee2c2e054522e1022f24f64fcc1b6ce6ac",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
29
29
|
"@babel/preset-env": "^7.15.8",
|
package/spin/animation.scss
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
$animation_duration-spin_wrapper-spin:
|
|
2
|
-
$animation_duration-spin_customChildren-spin: 1600ms; // 自定义指示器时旋转一周时长
|
|
1
|
+
$animation_duration-spin_wrapper-spin: 1200ms; // 加载图标容器旋转一周时长
|
|
2
|
+
$animation_duration-spin_customChildren-spin: 1600ms; // 自定义指示器时旋转一周时长
|
|
3
|
+
$animation_duration-spin_wrapper-spin-circle: 2500ms; // 加载图标弹性运动一周时长
|
package/spin/spin.scss
CHANGED
|
@@ -18,6 +18,21 @@ $module: #{$prefix}-spin;
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
@keyframes #{$prefix}-animation-circle {
|
|
22
|
+
0% {
|
|
23
|
+
stroke-dasharray: 1, 220;
|
|
24
|
+
stroke-dashoffset: 0;
|
|
25
|
+
}
|
|
26
|
+
50% {
|
|
27
|
+
stroke-dasharray: 150, 220;
|
|
28
|
+
stroke-dashoffset: -68px;
|
|
29
|
+
}
|
|
30
|
+
100% {
|
|
31
|
+
stroke-dasharray: 150, 220;
|
|
32
|
+
stroke-dashoffset: -218px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
21
36
|
&-wrapper {
|
|
22
37
|
text-align: center;
|
|
23
38
|
position: absolute;
|
|
@@ -27,10 +42,15 @@ $module: #{$prefix}-spin;
|
|
|
27
42
|
color: $color-spin-bg;
|
|
28
43
|
|
|
29
44
|
& > svg {
|
|
45
|
+
display: inline;
|
|
30
46
|
animation: $animation_duration-spin_wrapper-spin linear infinite #{$prefix}-animation-rotate;
|
|
31
47
|
animation-fill-mode: forwards;
|
|
32
48
|
vertical-align: top;
|
|
33
49
|
@include size($width-spin_middle);
|
|
50
|
+
|
|
51
|
+
& > circle {
|
|
52
|
+
animation: $animation_duration-spin_wrapper-spin-circle ease-in-out infinite #{$prefix}-animation-circle;
|
|
53
|
+
}
|
|
34
54
|
}
|
|
35
55
|
}
|
|
36
56
|
|
package/tooltip/foundation.ts
CHANGED
|
@@ -32,7 +32,7 @@ export interface TooltipAdapter<P = Record<string, any>, S = Record<string, any>
|
|
|
32
32
|
notifyVisibleChange(isVisible: any): void;
|
|
33
33
|
getPopupContainerRect(): PopupContainerDOMRect;
|
|
34
34
|
containerIsBody(): boolean;
|
|
35
|
-
off(arg0: string
|
|
35
|
+
off(arg0: string): void;
|
|
36
36
|
canMotion(): boolean;
|
|
37
37
|
registerScrollHandler(arg: () => Record<string, any>): void;
|
|
38
38
|
unregisterScrollHandler(): void;
|
|
@@ -68,8 +68,7 @@ export interface TooltipAdapter<P = Record<string, any>, S = Record<string, any>
|
|
|
68
68
|
setInitialFocus(): void;
|
|
69
69
|
notifyEscKeydown(event: any): void;
|
|
70
70
|
getTriggerNode(): any;
|
|
71
|
-
setId(): void
|
|
72
|
-
getTriggerDOM(): HTMLElement|null
|
|
71
|
+
setId(): void
|
|
73
72
|
}
|
|
74
73
|
|
|
75
74
|
export type Position = ArrayElement<typeof strings.POSITION_SET>;
|
|
@@ -116,6 +115,7 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
|
|
|
116
115
|
this._adapter.unregisterClickOutsideHandler();
|
|
117
116
|
this.unBindResizeEvent();
|
|
118
117
|
this.unBindScrollEvent();
|
|
118
|
+
clearTimeout(this._timer);
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
_bindTriggerEvent(triggerEventSet: Record<string, any>) {
|
|
@@ -299,16 +299,6 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
|
|
|
299
299
|
show = () => {
|
|
300
300
|
const content = this.getProp('content');
|
|
301
301
|
const trigger = this.getProp('trigger');
|
|
302
|
-
if (trigger==="hover") {
|
|
303
|
-
const checkTriggerIsHover = () => {
|
|
304
|
-
const triggerDOM = this._adapter.getTriggerDOM();
|
|
305
|
-
if (trigger && !triggerDOM.matches(":hover")) {
|
|
306
|
-
this.hide();
|
|
307
|
-
}
|
|
308
|
-
this._adapter.off("portalInserted", checkTriggerIsHover);
|
|
309
|
-
};
|
|
310
|
-
this._adapter.on('portalInserted', checkTriggerIsHover);
|
|
311
|
-
}
|
|
312
302
|
const clickTriggerToHide = this.getProp('clickTriggerToHide');
|
|
313
303
|
const { visible, displayNone } = this.getStates();
|
|
314
304
|
if (displayNone) {
|
package/utils/Event.ts
CHANGED
|
@@ -45,9 +45,7 @@ export default class Event {
|
|
|
45
45
|
if (!this._eventMap.has(event)) {
|
|
46
46
|
return false;
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
// clone to avoid someone writing the logic of deleting callback in callbacks into his or her callback code, for example the once func above
|
|
50
|
-
callbacks.forEach(callback => callback(...args));
|
|
48
|
+
this._eventMap.get(event).forEach(callback => callback(...args));
|
|
51
49
|
return true;
|
|
52
50
|
}
|
|
53
51
|
}
|