@nutui/nutui-react 3.0.0-beta.3 → 3.0.0-beta.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/dist/cjs/packages/address/style/style.css +1 -1
- package/dist/cjs/packages/animatingnumbers/countup.js +7 -6
- package/dist/cjs/packages/animatingnumbers/style/style.css +10 -4
- package/dist/cjs/packages/audio/style/style.css +49 -34
- package/dist/cjs/packages/button/style/button.scss +36 -19
- package/dist/cjs/packages/button/style/style.css +49 -34
- package/dist/cjs/packages/calendar/style/style.css +1 -1
- package/dist/cjs/packages/card/style/style.css +1 -0
- package/dist/cjs/packages/checkbox/checkbox.d.ts +1 -4
- package/dist/cjs/packages/checkbox/checkbox.js +0 -2
- package/dist/cjs/packages/checkbox/index.d.ts +7 -2
- package/dist/cjs/packages/checkbox/index.js +4 -1
- package/dist/cjs/packages/checkbox/style/style.css +10 -0
- package/dist/cjs/packages/checkboxgroup/style/checkboxgroup.scss +8 -0
- package/dist/cjs/packages/checkboxgroup/style/style.css +10 -0
- package/dist/cjs/packages/configprovider/types.d.ts +1 -1
- package/dist/cjs/packages/countdown/countdown.d.ts +2 -20
- package/dist/cjs/packages/countdown/countdown.js +3 -2
- package/dist/cjs/packages/countdown/index.d.ts +1 -1
- package/dist/cjs/packages/countdown/style/countdown.scss +8 -2
- package/dist/cjs/packages/countdown/style/style.css +18 -13
- package/dist/cjs/packages/countdown/types.d.ts +26 -0
- package/dist/cjs/packages/countdown/types.js +4 -0
- package/dist/cjs/packages/countup/style/countup.scss +10 -4
- package/dist/cjs/packages/countup/style/style.css +10 -4
- package/dist/cjs/packages/dialog/style/dialog.scss +10 -7
- package/dist/cjs/packages/dialog/style/style.css +58 -41
- package/dist/cjs/packages/progress/progress.js +1 -1
- package/dist/cjs/packages/progress/style/progress.scss +2 -2
- package/dist/cjs/packages/progress/style/style.css +3 -2
- package/dist/cjs/packages/rate/style/rate.scss +10 -5
- package/dist/cjs/packages/rate/style/style.css +7 -5
- package/dist/cjs/packages/tabbar/style/style.css +10 -0
- package/dist/cjs/packages/tabbaritem/style/style.css +10 -0
- package/dist/cjs/packages/tabbaritem/style/tabbaritem.scss +10 -0
- package/dist/cjs/packages/tag/style/style.css +1 -0
- package/dist/cjs/packages/tag/style/tag.scss +1 -0
- package/dist/cjs/packages/toast/style/index.js +1 -0
- package/dist/cjs/packages/toast/style/style.css +60 -0
- package/dist/cjs/packages/uploader/style/style.css +3 -2
- package/dist/cjs/utils/add-color-for-harmony.d.ts +9 -0
- package/dist/cjs/utils/add-color-for-harmony.js +27 -0
- package/dist/es/packages/address/style/style.css +1 -1
- package/dist/es/packages/animatingnumbers/countup.js +7 -6
- package/dist/es/packages/animatingnumbers/style/style.css +10 -4
- package/dist/es/packages/audio/style/style.css +49 -34
- package/dist/es/packages/button/style/button.scss +36 -19
- package/dist/es/packages/button/style/style.css +49 -34
- package/dist/es/packages/calendar/style/style.css +1 -1
- package/dist/es/packages/card/style/style.css +1 -0
- package/dist/es/packages/checkbox/checkbox.d.ts +1 -4
- package/dist/es/packages/checkbox/checkbox.js +1 -3
- package/dist/es/packages/checkbox/index.d.ts +7 -2
- package/dist/es/packages/checkbox/index.js +4 -1
- package/dist/es/packages/checkbox/style/style.css +10 -0
- package/dist/es/packages/checkboxgroup/checkboxgroup.d.ts +10 -50
- package/dist/es/packages/checkboxgroup/style/checkboxgroup.scss +8 -0
- package/dist/es/packages/checkboxgroup/style/style.css +10 -0
- package/dist/es/packages/configprovider/types.d.ts +1 -1
- package/dist/es/packages/countdown/countdown.d.ts +2 -20
- package/dist/es/packages/countdown/countdown.js +3 -2
- package/dist/es/packages/countdown/index.d.ts +1 -1
- package/dist/es/packages/countdown/style/countdown.scss +8 -2
- package/dist/es/packages/countdown/style/style.css +18 -13
- package/dist/es/packages/countdown/types.d.ts +26 -0
- package/dist/es/packages/countdown/types.js +1 -0
- package/dist/es/packages/countup/style/countup.scss +10 -4
- package/dist/es/packages/countup/style/style.css +10 -4
- package/dist/es/packages/dialog/style/dialog.scss +10 -7
- package/dist/es/packages/dialog/style/style.css +58 -41
- package/dist/es/packages/ellipsis/ellipsis.d.ts +1 -1
- package/dist/es/packages/progress/progress.js +1 -1
- package/dist/es/packages/progress/style/progress.scss +2 -2
- package/dist/es/packages/progress/style/style.css +3 -2
- package/dist/es/packages/rate/rate.d.ts +12 -60
- package/dist/es/packages/rate/style/rate.scss +10 -5
- package/dist/es/packages/rate/style/style.css +7 -5
- package/dist/es/packages/tabbar/style/style.css +10 -0
- package/dist/es/packages/tabbar/tabbar.d.ts +7 -35
- package/dist/es/packages/tabbaritem/style/style.css +10 -0
- package/dist/es/packages/tabbaritem/style/tabbaritem.scss +10 -0
- package/dist/es/packages/tabbaritem/tabbaritem.d.ts +7 -35
- package/dist/es/packages/tag/style/style.css +1 -0
- package/dist/es/packages/tag/style/tag.scss +1 -0
- package/dist/es/packages/toast/style/index.js +1 -0
- package/dist/es/packages/toast/style/style.css +60 -0
- package/dist/es/packages/uploader/style/style.css +3 -2
- package/dist/es/utils/add-color-for-harmony.d.ts +9 -0
- package/dist/es/utils/add-color-for-harmony.js +16 -0
- package/dist/nutui.react.umd.js +149 -146
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +29 -29
- package/dist/styles/variables.scss +36 -30
- package/package.json +1 -1
|
@@ -39,7 +39,7 @@ export var Progress = function(props) {
|
|
|
39
39
|
var _useState = _sliced_to_array(useState(0), 2), displayPercent = _useState[0], setDispalyPercent = _useState[1];
|
|
40
40
|
var stylesInner = {
|
|
41
41
|
width: "".concat(displayPercent, "%"),
|
|
42
|
-
|
|
42
|
+
background: color || '#FF0F23'
|
|
43
43
|
};
|
|
44
44
|
useEffect(function() {
|
|
45
45
|
setDispalyPercent(percent);
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
justify-content: center;
|
|
30
30
|
transition: all 0.4s;
|
|
31
31
|
border-radius: $progress-border-radius;
|
|
32
|
-
background
|
|
32
|
+
background: $progress-color;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
&-text {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
top: $progress-text-position-top;
|
|
40
40
|
bottom: $progress-text-position-bottom;
|
|
41
41
|
transition: all 0.4s;
|
|
42
|
-
|
|
42
|
+
transform: translate(-50%);
|
|
43
43
|
|
|
44
44
|
&-inner {
|
|
45
45
|
display: flex;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
justify-content: center;
|
|
28
28
|
transition: all 0.4s;
|
|
29
29
|
border-radius: var(--nutui-progress-border-radius, 12px);
|
|
30
|
-
background
|
|
30
|
+
background: var(--nutui-progress-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
|
|
31
31
|
}
|
|
32
32
|
.nut-progress-text {
|
|
33
33
|
display: flex;
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
top: var(--nutui-progress-text-position-top, -4px);
|
|
37
37
|
bottom: var(--nutui-progress-text-position-bottom, -4px);
|
|
38
38
|
transition: all 0.4s;
|
|
39
|
+
transform: translate(-50%);
|
|
39
40
|
}
|
|
40
41
|
.nut-progress-text-inner {
|
|
41
42
|
display: flex;
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
border-radius: var(--nutui-progress-text-border-radius, 5px);
|
|
50
51
|
font-size: var(--nutui-progress-text-font-size, 9px);
|
|
51
52
|
line-height: 1;
|
|
52
|
-
background: var(--nutui-progress-text-background, #ff0f23);
|
|
53
|
+
background: var(--nutui-progress-text-background, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
|
|
53
54
|
}
|
|
54
55
|
@keyframes progressActive {
|
|
55
56
|
0% {
|
|
@@ -1,65 +1,17 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
2
|
import { BasicComponent } from "../../utils/typings";
|
|
3
3
|
export interface RateProps extends BasicComponent {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* @default 0
|
|
17
|
-
*/
|
|
18
|
-
defaultValue: number
|
|
19
|
-
/**
|
|
20
|
-
* 最少选中star数量
|
|
21
|
-
* @default 0
|
|
22
|
-
*/
|
|
23
|
-
min: number
|
|
24
|
-
/**
|
|
25
|
-
* 使用图标(选中)
|
|
26
|
-
* @default star-n
|
|
27
|
-
*/
|
|
28
|
-
checkedIcon: React.ReactNode
|
|
29
|
-
/**
|
|
30
|
-
* 使用图标(未选中)
|
|
31
|
-
* @default star-n
|
|
32
|
-
*/
|
|
33
|
-
uncheckedIcon: React.ReactNode
|
|
34
|
-
/**
|
|
35
|
-
* 是否禁用
|
|
36
|
-
* @default false
|
|
37
|
-
*/
|
|
38
|
-
disabled: boolean
|
|
39
|
-
/**
|
|
40
|
-
* 是否只读
|
|
41
|
-
* @default false
|
|
42
|
-
*/
|
|
43
|
-
readOnly: boolean
|
|
44
|
-
/**
|
|
45
|
-
* 是否半星
|
|
46
|
-
* @default false
|
|
47
|
-
*/
|
|
48
|
-
allowHalf: boolean
|
|
49
|
-
/**
|
|
50
|
-
* 是否允许滑动选择
|
|
51
|
-
* @default false
|
|
52
|
-
*/
|
|
53
|
-
touchable: boolean
|
|
54
|
-
/**
|
|
55
|
-
* 当前 star 数修改时触发
|
|
56
|
-
* @default -
|
|
57
|
-
*/
|
|
58
|
-
onChange: (value: number) => void
|
|
59
|
-
/**
|
|
60
|
-
* touch 滑动结束时触发
|
|
61
|
-
* @default -
|
|
62
|
-
*/
|
|
63
|
-
onTouchEnd: (e: TouchEvent, value: number) => void
|
|
4
|
+
count: number;
|
|
5
|
+
value: number;
|
|
6
|
+
defaultValue: number;
|
|
7
|
+
min: number;
|
|
8
|
+
checkedIcon: React.ReactNode;
|
|
9
|
+
uncheckedIcon: React.ReactNode;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
readOnly: boolean;
|
|
12
|
+
allowHalf: boolean;
|
|
13
|
+
touchable: boolean;
|
|
14
|
+
onChange: (value: number) => void;
|
|
15
|
+
onTouchEnd: (e: TouchEvent, value: number) => void;
|
|
64
16
|
}
|
|
65
17
|
export declare const Rate: FunctionComponent<Partial<RateProps>>;
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-shrink: 0;
|
|
20
20
|
position: relative;
|
|
21
|
-
margin-
|
|
21
|
+
margin-left: $rate-item-margin;
|
|
22
22
|
|
|
23
|
-
&:
|
|
24
|
-
margin-
|
|
23
|
+
&:first-child {
|
|
24
|
+
margin-left: 0;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
&-half {
|
|
@@ -39,11 +39,16 @@
|
|
|
39
39
|
|
|
40
40
|
&-icon {
|
|
41
41
|
display: flex;
|
|
42
|
-
color: $rate-icon-color;
|
|
43
42
|
cursor: pointer;
|
|
44
43
|
|
|
44
|
+
.nut-icon {
|
|
45
|
+
color: $rate-icon-color;
|
|
46
|
+
}
|
|
47
|
+
|
|
45
48
|
&-disabled {
|
|
46
|
-
|
|
49
|
+
.nut-icon {
|
|
50
|
+
color: $rate-icon-inactive-color;
|
|
51
|
+
}
|
|
47
52
|
}
|
|
48
53
|
|
|
49
54
|
&.nut-rate-item-icon.nut-rate-item-icon-half {
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-shrink: 0;
|
|
14
14
|
position: relative;
|
|
15
|
-
margin-
|
|
15
|
+
margin-left: var(--nutui-rate-item-margin, 14px);
|
|
16
16
|
}
|
|
17
|
-
.nut-rate-item:
|
|
18
|
-
margin-
|
|
17
|
+
.nut-rate-item:first-child {
|
|
18
|
+
margin-left: 0;
|
|
19
19
|
}
|
|
20
20
|
.nut-rate-item-half {
|
|
21
21
|
position: absolute;
|
|
@@ -30,10 +30,12 @@
|
|
|
30
30
|
}
|
|
31
31
|
.nut-rate-item-icon {
|
|
32
32
|
display: flex;
|
|
33
|
-
color: var(--nutui-rate-icon-color, var(--nutui-color-primary, #ff0f23));
|
|
34
33
|
cursor: pointer;
|
|
35
34
|
}
|
|
36
|
-
.nut-rate-item-icon-
|
|
35
|
+
.nut-rate-item-icon .nut-icon {
|
|
36
|
+
color: var(--nutui-rate-icon-color, var(--nutui-color-primary, #ff0f23));
|
|
37
|
+
}
|
|
38
|
+
.nut-rate-item-icon-disabled .nut-icon {
|
|
37
39
|
color: var(--nutui-rate-icon-inactive-color, var(--nutui-color-text-disabled, #c2c4cc));
|
|
38
40
|
}
|
|
39
41
|
.nut-rate-item-icon.nut-rate-item-icon.nut-rate-item-icon-half {
|
|
@@ -110,10 +110,20 @@
|
|
|
110
110
|
color: var(--nutui-tabbar-active-color, var(--nutui-color-primary, #ff0f23));
|
|
111
111
|
}
|
|
112
112
|
.nut-tabbar-item-active .nut-tabbar-item-icon-box {
|
|
113
|
+
/* #ifdef harmony*/
|
|
114
|
+
color: var(--nutui-tabbar-active-color, var(--nutui-color-primary, #ff0f23));
|
|
115
|
+
/* #endif*/
|
|
116
|
+
/* #ifndef harmony*/
|
|
113
117
|
color: inherit;
|
|
118
|
+
/* #endif*/
|
|
114
119
|
}
|
|
115
120
|
.nut-tabbar-item-active .nut-tabbar-item-icon-box .nut-icon {
|
|
121
|
+
/* #ifdef harmony*/
|
|
122
|
+
color: var(--nutui-tabbar-active-color, var(--nutui-color-primary, #ff0f23));
|
|
123
|
+
/* #endif*/
|
|
124
|
+
/* #ifndef harmony*/
|
|
116
125
|
color: inherit;
|
|
126
|
+
/* #endif*/
|
|
117
127
|
}
|
|
118
128
|
|
|
119
129
|
.nut-tabbar {
|
|
@@ -2,41 +2,13 @@ import { FunctionComponent } from 'react';
|
|
|
2
2
|
import { BasicComponent } from "../../utils/typings";
|
|
3
3
|
import TabbarItem from '../tabbaritem';
|
|
4
4
|
export interface TabbarProps extends BasicComponent {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
* @default -
|
|
13
|
-
*/
|
|
14
|
-
value?: number
|
|
15
|
-
/**
|
|
16
|
-
* 是否固定在页面底部,为 true 时默认开启 safeArea
|
|
17
|
-
* @default false
|
|
18
|
-
*/
|
|
19
|
-
fixed: boolean
|
|
20
|
-
/**
|
|
21
|
-
* icon未激活的颜色
|
|
22
|
-
* @default #7d7e80
|
|
23
|
-
*/
|
|
24
|
-
inactiveColor: string
|
|
25
|
-
/**
|
|
26
|
-
* icon激活的颜色
|
|
27
|
-
* @default #0073ff
|
|
28
|
-
*/
|
|
29
|
-
activeColor: string
|
|
30
|
-
/**
|
|
31
|
-
* 是否开启iphone系列全面屏底部安全区适配
|
|
32
|
-
* @default false
|
|
33
|
-
*/
|
|
34
|
-
safeArea: boolean
|
|
35
|
-
/**
|
|
36
|
-
* 切换页签时触发事件
|
|
37
|
-
* @default -
|
|
38
|
-
*/
|
|
39
|
-
onSwitch: (value: number) => void
|
|
5
|
+
defaultValue: number;
|
|
6
|
+
value?: number;
|
|
7
|
+
fixed: boolean;
|
|
8
|
+
inactiveColor: string;
|
|
9
|
+
activeColor: string;
|
|
10
|
+
safeArea: boolean;
|
|
11
|
+
onSwitch: (value: number) => void;
|
|
40
12
|
}
|
|
41
13
|
export declare const Tabbar: FunctionComponent<Partial<TabbarProps>> & {
|
|
42
14
|
Item: typeof TabbarItem;
|
|
@@ -110,8 +110,18 @@
|
|
|
110
110
|
color: var(--nutui-tabbar-active-color, var(--nutui-color-primary, #ff0f23));
|
|
111
111
|
}
|
|
112
112
|
.nut-tabbar-item-active .nut-tabbar-item-icon-box {
|
|
113
|
+
/* #ifdef harmony*/
|
|
114
|
+
color: var(--nutui-tabbar-active-color, var(--nutui-color-primary, #ff0f23));
|
|
115
|
+
/* #endif*/
|
|
116
|
+
/* #ifndef harmony*/
|
|
113
117
|
color: inherit;
|
|
118
|
+
/* #endif*/
|
|
114
119
|
}
|
|
115
120
|
.nut-tabbar-item-active .nut-tabbar-item-icon-box .nut-icon {
|
|
121
|
+
/* #ifdef harmony*/
|
|
122
|
+
color: var(--nutui-tabbar-active-color, var(--nutui-color-primary, #ff0f23));
|
|
123
|
+
/* #endif*/
|
|
124
|
+
/* #ifndef harmony*/
|
|
116
125
|
color: inherit;
|
|
126
|
+
/* #endif*/
|
|
117
127
|
}
|
|
@@ -40,10 +40,20 @@
|
|
|
40
40
|
color: $tabbar-active-color;
|
|
41
41
|
|
|
42
42
|
.nut-tabbar-item-icon-box {
|
|
43
|
+
/* #ifdef harmony*/
|
|
44
|
+
color: $tabbar-active-color;
|
|
45
|
+
/* #endif*/
|
|
46
|
+
/* #ifndef harmony*/
|
|
43
47
|
color: inherit;
|
|
48
|
+
/* #endif*/
|
|
44
49
|
|
|
45
50
|
.nut-icon {
|
|
51
|
+
/* #ifdef harmony*/
|
|
52
|
+
color: $tabbar-active-color;
|
|
53
|
+
/* #endif*/
|
|
54
|
+
/* #ifndef harmony*/
|
|
46
55
|
color: inherit;
|
|
56
|
+
/* #endif*/
|
|
47
57
|
}
|
|
48
58
|
}
|
|
49
59
|
}
|
|
@@ -1,40 +1,12 @@
|
|
|
1
1
|
import { FunctionComponent, ReactNode } from 'react';
|
|
2
2
|
import { BasicComponent } from "../../utils/typings";
|
|
3
3
|
export interface TabbarItemProps extends BasicComponent {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* @default -
|
|
12
|
-
*/
|
|
13
|
-
icon: ReactNode
|
|
14
|
-
/**
|
|
15
|
-
* 徽标中显示的内容,支持数字、字符和自定义内容
|
|
16
|
-
* @default -
|
|
17
|
-
*/
|
|
18
|
-
value: ReactNode
|
|
19
|
-
/**
|
|
20
|
-
* 徽标是否为小点
|
|
21
|
-
* @default false
|
|
22
|
-
*/
|
|
23
|
-
dot: boolean
|
|
24
|
-
/**
|
|
25
|
-
* value 为数值时,最大值
|
|
26
|
-
* @default 99
|
|
27
|
-
*/
|
|
28
|
-
max: number
|
|
29
|
-
/**
|
|
30
|
-
* 徽标的上下偏移量,支持单位设置,可设置为:5 等
|
|
31
|
-
* @default 0
|
|
32
|
-
*/
|
|
33
|
-
top: string
|
|
34
|
-
/**
|
|
35
|
-
* 徽标的左右偏移量,支持单位设置,可设置为:5 等
|
|
36
|
-
* @default 0
|
|
37
|
-
*/
|
|
38
|
-
right: string
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
icon: ReactNode;
|
|
6
|
+
value: ReactNode;
|
|
7
|
+
dot: boolean;
|
|
8
|
+
max: number;
|
|
9
|
+
top: string;
|
|
10
|
+
right: string;
|
|
39
11
|
}
|
|
40
12
|
export declare const TabbarItem: FunctionComponent<Partial<TabbarItemProps>>;
|
|
@@ -1,3 +1,63 @@
|
|
|
1
|
+
.nut-overlay {
|
|
2
|
+
/* #ifdef rn */
|
|
3
|
+
position: absolute;
|
|
4
|
+
/* #endif */
|
|
5
|
+
/* #ifndef rn */
|
|
6
|
+
position: fixed;
|
|
7
|
+
/* #endif */
|
|
8
|
+
top: 0;
|
|
9
|
+
left: 0;
|
|
10
|
+
bottom: 0;
|
|
11
|
+
right: 0;
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
background-color: var(--nutui-overlay-bg-color, var(--nutui-color-mask, rgba(0, 0, 0, 0.7)));
|
|
15
|
+
z-index: var(--nutui-overlay-zIndex, 1000);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
[dir=rtl] .nut-overlay,
|
|
19
|
+
.nut-rtl .nut-overlay {
|
|
20
|
+
left: auto;
|
|
21
|
+
right: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.nut-overflow-hidden {
|
|
25
|
+
overflow: hidden !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@keyframes nut-fade-in {
|
|
29
|
+
0% {
|
|
30
|
+
opacity: 0;
|
|
31
|
+
}
|
|
32
|
+
1% {
|
|
33
|
+
opacity: 0;
|
|
34
|
+
}
|
|
35
|
+
100% {
|
|
36
|
+
opacity: 1;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
@keyframes nut-fade-out {
|
|
40
|
+
0% {
|
|
41
|
+
opacity: 1;
|
|
42
|
+
}
|
|
43
|
+
1% {
|
|
44
|
+
opacity: 1;
|
|
45
|
+
}
|
|
46
|
+
100% {
|
|
47
|
+
opacity: 0;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
.nut-overlay-slide-enter-active, .nut-overlay-slide-appear-active {
|
|
51
|
+
animation-fill-mode: both;
|
|
52
|
+
animation-name: nut-fade-in;
|
|
53
|
+
animation-duration: var(--nutui-overlay-animation-duration, 0.3s);
|
|
54
|
+
}
|
|
55
|
+
.nut-overlay-slide-exit-active {
|
|
56
|
+
animation-fill-mode: both;
|
|
57
|
+
animation-name: nut-fade-out;
|
|
58
|
+
animation-duration: var(--nutui-overlay-animation-duration, 0.3s);
|
|
59
|
+
}
|
|
60
|
+
|
|
1
61
|
@keyframes rotation {
|
|
2
62
|
0% {
|
|
3
63
|
-webkit-transform: rotate(0deg);
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
justify-content: center;
|
|
28
28
|
transition: all 0.4s;
|
|
29
29
|
border-radius: var(--nutui-progress-border-radius, 12px);
|
|
30
|
-
background
|
|
30
|
+
background: var(--nutui-progress-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
|
|
31
31
|
}
|
|
32
32
|
.nut-progress-text {
|
|
33
33
|
display: flex;
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
top: var(--nutui-progress-text-position-top, -4px);
|
|
37
37
|
bottom: var(--nutui-progress-text-position-bottom, -4px);
|
|
38
38
|
transition: all 0.4s;
|
|
39
|
+
transform: translate(-50%);
|
|
39
40
|
}
|
|
40
41
|
.nut-progress-text-inner {
|
|
41
42
|
display: flex;
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
border-radius: var(--nutui-progress-text-border-radius, 5px);
|
|
50
51
|
font-size: var(--nutui-progress-text-font-size, 9px);
|
|
51
52
|
line-height: 1;
|
|
52
|
-
background: var(--nutui-progress-text-background, #ff0f23);
|
|
53
|
+
background: var(--nutui-progress-text-background, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
|
|
53
54
|
}
|
|
54
55
|
@keyframes progressActive {
|
|
55
56
|
0% {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 为支持 Harmony 的 React 元素添加颜色属性
|
|
4
|
+
* @param maybeElement - 要处理的 React 节点
|
|
5
|
+
* @param color - 要添加的颜色值(如:'#ff0000')
|
|
6
|
+
* @returns 处理后的 React 节点
|
|
7
|
+
*/
|
|
8
|
+
declare function addColorForHarmony(maybeElement: ReactNode, color?: string): string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined;
|
|
9
|
+
export default addColorForHarmony;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { harmony } from "./platform-taro";
|
|
3
|
+
/**
|
|
4
|
+
* 为支持 Harmony 的 React 元素添加颜色属性
|
|
5
|
+
* @param maybeElement - 要处理的 React 节点
|
|
6
|
+
* @param color - 要添加的颜色值(如:'#ff0000')
|
|
7
|
+
* @returns 处理后的 React 节点
|
|
8
|
+
*/ function addColorForHarmony(maybeElement, color) {
|
|
9
|
+
if (React.isValidElement(maybeElement) && harmony()) {
|
|
10
|
+
return React.cloneElement(maybeElement, {
|
|
11
|
+
color: color
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return maybeElement;
|
|
15
|
+
}
|
|
16
|
+
export default addColorForHarmony;
|