@nutui/nutui-react 3.0.11 → 3.0.12
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/CHANGELOG.md +20 -7
- package/dist/cjs/packages/address/style/address.scss +114 -0
- package/dist/cjs/packages/address/style/style.css +103 -0
- package/dist/cjs/packages/address/style-jmapp/address.scss +114 -0
- package/dist/cjs/packages/address/style-jmapp/style.css +103 -0
- package/dist/cjs/packages/address/style-jrkf/address.scss +114 -0
- package/dist/cjs/packages/address/style-jrkf/style.css +103 -0
- package/dist/cjs/packages/configprovider/types.d.ts +1 -1
- package/dist/cjs/packages/elevator/style/css.js +0 -2
- package/dist/cjs/packages/elevator/style/elevator.scss +116 -95
- package/dist/cjs/packages/elevator/style/index.js +0 -2
- package/dist/cjs/packages/elevator/style/style.css +98 -83
- package/dist/cjs/packages/elevator/style-jmapp/css.js +0 -2
- package/dist/cjs/packages/elevator/style-jmapp/elevator.scss +116 -95
- package/dist/cjs/packages/elevator/style-jmapp/index.js +0 -2
- package/dist/cjs/packages/elevator/style-jmapp/style.css +98 -83
- package/dist/cjs/packages/elevator/style-jrkf/css.js +0 -2
- package/dist/cjs/packages/elevator/style-jrkf/elevator.scss +116 -95
- package/dist/cjs/packages/elevator/style-jrkf/index.js +0 -2
- package/dist/cjs/packages/elevator/style-jrkf/style.css +98 -83
- package/dist/cjs/packages/progress/progress.js +38 -17
- package/dist/cjs/packages/progress/style/progress.scss +5 -21
- package/dist/cjs/packages/progress/style/style.css +5 -19
- package/dist/cjs/packages/progress/style-jmapp/progress.scss +5 -21
- package/dist/cjs/packages/progress/style-jmapp/style.css +4 -18
- package/dist/cjs/packages/progress/style-jrkf/progress.scss +5 -21
- package/dist/cjs/packages/progress/style-jrkf/style.css +4 -18
- package/dist/cjs/packages/range/range.js +5 -11
- package/dist/cjs/packages/range/style/range.scss +6 -2
- package/dist/cjs/packages/range/style/style.css +3 -1
- package/dist/cjs/packages/range/style-jmapp/range.scss +6 -2
- package/dist/cjs/packages/range/style-jmapp/style.css +3 -1
- package/dist/cjs/packages/range/style-jrkf/range.scss +6 -2
- package/dist/cjs/packages/range/style-jrkf/style.css +3 -1
- package/dist/cjs/packages/range/utils.d.ts +3 -0
- package/dist/cjs/packages/range/utils.js +24 -0
- package/dist/cjs/packages/searchbar/searchbar.js +162 -87
- package/dist/cjs/packages/searchbar/style/searchbar.scss +99 -25
- package/dist/cjs/packages/searchbar/style/style.css +102 -38
- package/dist/cjs/packages/searchbar/style-jmapp/searchbar.scss +99 -25
- package/dist/cjs/packages/searchbar/style-jmapp/style.css +85 -21
- package/dist/cjs/packages/searchbar/style-jrkf/searchbar.scss +99 -25
- package/dist/cjs/packages/searchbar/style-jrkf/style.css +85 -21
- package/dist/cjs/packages/step/step.js +74 -33
- package/dist/cjs/packages/step/style/step.scss +104 -195
- package/dist/cjs/packages/step/style/style.css +85 -159
- package/dist/cjs/packages/step/style-jmapp/step.scss +104 -195
- package/dist/cjs/packages/step/style-jmapp/style.css +88 -162
- package/dist/cjs/packages/step/style-jrkf/step.scss +104 -195
- package/dist/cjs/packages/step/style-jrkf/style.css +88 -162
- package/dist/cjs/packages/steps/steps.js +23 -8
- package/dist/cjs/packages/steps/style/steps.scss +328 -4
- package/dist/cjs/packages/steps/style/style.css +219 -2
- package/dist/cjs/packages/steps/style-jmapp/steps.scss +328 -4
- package/dist/cjs/packages/steps/style-jmapp/style.css +219 -2
- package/dist/cjs/packages/steps/style-jrkf/steps.scss +328 -4
- package/dist/cjs/packages/steps/style-jrkf/style.css +219 -2
- package/dist/cjs/packages/uploader/uploader.js +20 -9
- package/dist/cjs/types/spec/progress/base.d.ts +6 -0
- package/dist/cjs/types/spec/progress/taro.d.ts +4 -0
- package/dist/cjs/types/spec/searchbar/base.d.ts +3 -0
- package/dist/cjs/types/spec/steps/base.d.ts +11 -2
- package/dist/es/packages/address/style/address.scss +114 -0
- package/dist/es/packages/address/style/style.css +103 -0
- package/dist/es/packages/address/style-jmapp/address.scss +114 -0
- package/dist/es/packages/address/style-jmapp/style.css +103 -0
- package/dist/es/packages/address/style-jrkf/address.scss +114 -0
- package/dist/es/packages/address/style-jrkf/style.css +103 -0
- package/dist/es/packages/configprovider/types.d.ts +1 -1
- package/dist/es/packages/elevator/style/css.js +0 -2
- package/dist/es/packages/elevator/style/elevator.scss +116 -95
- package/dist/es/packages/elevator/style/index.js +0 -2
- package/dist/es/packages/elevator/style/style.css +98 -83
- package/dist/es/packages/elevator/style-jmapp/css.js +0 -2
- package/dist/es/packages/elevator/style-jmapp/elevator.scss +116 -95
- package/dist/es/packages/elevator/style-jmapp/index.js +0 -2
- package/dist/es/packages/elevator/style-jmapp/style.css +98 -83
- package/dist/es/packages/elevator/style-jrkf/css.js +0 -2
- package/dist/es/packages/elevator/style-jrkf/elevator.scss +116 -95
- package/dist/es/packages/elevator/style-jrkf/index.js +0 -2
- package/dist/es/packages/elevator/style-jrkf/style.css +98 -83
- package/dist/es/packages/progress/progress.js +38 -17
- package/dist/es/packages/progress/style/progress.scss +5 -21
- package/dist/es/packages/progress/style/style.css +5 -19
- package/dist/es/packages/progress/style-jmapp/progress.scss +5 -21
- package/dist/es/packages/progress/style-jmapp/style.css +4 -18
- package/dist/es/packages/progress/style-jrkf/progress.scss +5 -21
- package/dist/es/packages/progress/style-jrkf/style.css +4 -18
- package/dist/es/packages/range/range.js +5 -11
- package/dist/es/packages/range/style/range.scss +6 -2
- package/dist/es/packages/range/style/style.css +3 -1
- package/dist/es/packages/range/style-jmapp/range.scss +6 -2
- package/dist/es/packages/range/style-jmapp/style.css +3 -1
- package/dist/es/packages/range/style-jrkf/range.scss +6 -2
- package/dist/es/packages/range/style-jrkf/style.css +3 -1
- package/dist/es/packages/range/utils.d.ts +3 -0
- package/dist/es/packages/range/utils.js +6 -0
- package/dist/es/packages/searchbar/searchbar.js +163 -89
- package/dist/es/packages/searchbar/style/searchbar.scss +99 -25
- package/dist/es/packages/searchbar/style/style.css +102 -38
- package/dist/es/packages/searchbar/style-jmapp/searchbar.scss +99 -25
- package/dist/es/packages/searchbar/style-jmapp/style.css +85 -21
- package/dist/es/packages/searchbar/style-jrkf/searchbar.scss +99 -25
- package/dist/es/packages/searchbar/style-jrkf/style.css +85 -21
- package/dist/es/packages/step/step.js +75 -34
- package/dist/es/packages/step/style/step.scss +104 -195
- package/dist/es/packages/step/style/style.css +85 -159
- package/dist/es/packages/step/style-jmapp/step.scss +104 -195
- package/dist/es/packages/step/style-jmapp/style.css +88 -162
- package/dist/es/packages/step/style-jrkf/step.scss +104 -195
- package/dist/es/packages/step/style-jrkf/style.css +88 -162
- package/dist/es/packages/steps/steps.js +23 -8
- package/dist/es/packages/steps/style/steps.scss +328 -4
- package/dist/es/packages/steps/style/style.css +219 -2
- package/dist/es/packages/steps/style-jmapp/steps.scss +328 -4
- package/dist/es/packages/steps/style-jmapp/style.css +219 -2
- package/dist/es/packages/steps/style-jrkf/steps.scss +328 -4
- package/dist/es/packages/steps/style-jrkf/style.css +219 -2
- package/dist/es/packages/uploader/uploader.js +20 -9
- package/dist/es/types/spec/progress/base.d.ts +24 -0
- package/dist/es/types/spec/progress/taro.d.ts +4 -0
- package/dist/es/types/spec/searchbar/base.d.ts +10 -1
- package/dist/es/types/spec/steps/base.d.ts +26 -5
- package/dist/nutui.react.umd.js +317 -167
- package/dist/style-jmapp.css +1 -1
- package/dist/style-jmapp.scss +44 -44
- package/dist/style-jrkf.css +1 -1
- package/dist/style-jrkf.scss +46 -46
- package/dist/style.css +1 -1
- package/dist/style.scss +37 -37
- package/dist/styles/variables-jmapp.scss +133 -79
- package/dist/styles/variables-jrkf.scss +134 -80
- package/dist/styles/variables.scss +148 -89
- package/package.json +1 -1
|
@@ -2,105 +2,120 @@
|
|
|
2
2
|
/* #endif */
|
|
3
3
|
/* #ifndef harmony */
|
|
4
4
|
/* #endif */
|
|
5
|
-
.nut-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
.nut-elevator {
|
|
6
|
+
width: 100%;
|
|
7
|
+
display: block;
|
|
8
|
+
position: relative;
|
|
9
|
+
overflow: hidden;
|
|
9
10
|
}
|
|
10
|
-
.nut-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
.nut-elevator-list {
|
|
12
|
+
display: block;
|
|
13
|
+
position: relative;
|
|
14
|
+
top: 0;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
font-size: var(--nutui-elevator-list-font-size, var(--nutui-font-text-small));
|
|
17
|
+
color: var(--nutui-elevator-list-color, var(--nutui-color-title));
|
|
15
18
|
}
|
|
16
|
-
.nut-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
font-size: 12px;
|
|
23
|
-
border-radius: 4px;
|
|
24
|
-
margin-bottom: 7px;
|
|
25
|
-
/* #ifdef harmony*/
|
|
26
|
-
margin-right: 6px;
|
|
27
|
-
/* #endif */
|
|
28
|
-
/* #ifndef harmony*/
|
|
29
|
-
margin-right: 7px;
|
|
30
|
-
/* #endif */
|
|
31
|
-
background-color: var(--nutui-gray-2, #f0f0f0);
|
|
32
|
-
color: var(--nutui-color-title);
|
|
19
|
+
.nut-elevator-list-inner {
|
|
20
|
+
height: 100%;
|
|
21
|
+
width: 100%;
|
|
22
|
+
display: block;
|
|
23
|
+
background-color: var(--nutui-elevator-list-bg-color, #ffffff);
|
|
24
|
+
overflow: auto;
|
|
33
25
|
}
|
|
34
|
-
.nut-
|
|
35
|
-
|
|
26
|
+
.nut-elevator-list-item {
|
|
27
|
+
display: block;
|
|
36
28
|
}
|
|
37
|
-
.nut-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
.nut-elevator-list-item-code {
|
|
30
|
+
display: flex;
|
|
31
|
+
position: relative;
|
|
32
|
+
height: var(--nutui-elevator-list-item-code-height, 20px);
|
|
33
|
+
line-height: var(--nutui-elevator-list-item-code-line-height, 20px);
|
|
34
|
+
font-size: var(--nutui-elevator-list-item-code-font-size, var(--nutui-font-text));
|
|
35
|
+
color: var(--nutui-elevator-list-item-code-color, var(--nutui-color-title));
|
|
36
|
+
padding: var(--nutui-elevator-list-item-padding, 0 20px);
|
|
37
|
+
font-weight: var(--nutui-elevator-list-item-code-font-weight, var(--nutui-font-weight-bold));
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
border-bottom: var(--nutui-elevator-list-item-code-border-bottom, none);
|
|
40
|
+
background-color: var(--nutui-elevator-list-item-code-background-color, var(--nutui-color-default-light));
|
|
41
41
|
}
|
|
42
|
-
.nut-
|
|
43
|
-
width: 100%;
|
|
44
|
-
height: 60px;
|
|
45
|
-
padding: 0 16px;
|
|
42
|
+
.nut-elevator-list-item-name {
|
|
46
43
|
display: flex;
|
|
47
44
|
align-items: center;
|
|
48
|
-
|
|
45
|
+
padding: var(--nutui-elevator-list-item-padding, 0 20px);
|
|
46
|
+
height: var(--nutui-elevator-list-item-name-height, 52px);
|
|
47
|
+
line-height: var(--nutui-elevator-list-item-name-line-height, 52px);
|
|
49
48
|
}
|
|
50
|
-
.nut-
|
|
51
|
-
font-size: 12px;
|
|
52
|
-
display: inline-block;
|
|
53
|
-
height: 28px;
|
|
54
|
-
line-height: 28px;
|
|
55
|
-
padding: 0 12px;
|
|
56
|
-
border-radius: 4px;
|
|
57
|
-
background-color: var(--nutui-gray-2, #f0f0f0);
|
|
58
|
-
}
|
|
59
|
-
.nut-address-selected-item.active {
|
|
60
|
-
border: 1px solid var(--nutui-color-primary, #ff6666);
|
|
61
|
-
background-color: var(--nutui-color-primary-light-pressed, #ffcccc);
|
|
49
|
+
.nut-elevator-list-item-name-highcolor {
|
|
62
50
|
color: var(--nutui-color-primary, #ff6666);
|
|
63
51
|
}
|
|
64
|
-
.nut-
|
|
65
|
-
|
|
66
|
-
|
|
52
|
+
.nut-elevator-list-fixed {
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
width: 100%;
|
|
56
|
+
position: absolute;
|
|
57
|
+
top: 0;
|
|
58
|
+
left: 0;
|
|
59
|
+
z-index: 1;
|
|
60
|
+
padding: var(--nutui-elevator-list-item-padding, 0 20px);
|
|
61
|
+
height: var(--nutui-elevator-list-item-code-height, 20px);
|
|
62
|
+
background-color: var(--nutui-elevator-list-fixed-bg-color, var(--nutui-color-default-light));
|
|
63
|
+
box-sizing: border-box;
|
|
64
|
+
box-shadow: var(--nutui-elevator-list-fixed-box-shadow, 0 0 10px #eee);
|
|
67
65
|
}
|
|
68
|
-
.nut-
|
|
69
|
-
|
|
66
|
+
.nut-elevator-list-fixed-title {
|
|
67
|
+
font-size: var(--nutui-elevator-list-item-code-font-size, var(--nutui-font-text));
|
|
68
|
+
color: var(--nutui-elevator-list-fixed-color, var(--nutui-color-primary, #ff6666));
|
|
69
|
+
font-weight: var(--nutui-elevator-list-item-code-font-weight, var(--nutui-font-weight-bold));
|
|
70
70
|
}
|
|
71
|
-
.nut-
|
|
72
|
-
position:
|
|
73
|
-
|
|
71
|
+
.nut-elevator-code-current {
|
|
72
|
+
position: absolute;
|
|
73
|
+
right: var(--nutui-elevator-list-item-code-current-right, 40px);
|
|
74
|
+
top: var(--nutui-elevator-list-item-code-current-top, 50%);
|
|
75
|
+
transform: var(--nutui-elevator-bars-transform, translateY(-50%));
|
|
76
|
+
width: var(--nutui-elevator-list-item-code-current-width, 48px);
|
|
77
|
+
height: var(--nutui-elevator-list-item-code-current-height, 48px);
|
|
78
|
+
line-height: var(--nutui-elevator-list-item-code-current-line-height, 48px);
|
|
79
|
+
border-radius: var(--nutui-elevator-list-item-code-current-border-radius, 50% 0 50% 50%);
|
|
80
|
+
background: var(--nutui-elevator-list-item-code-current-bg-color, var(--nutui-color-default-light));
|
|
81
|
+
box-shadow: 0px 2px 6px 0px rgba(4, 1, 135, 0.08);
|
|
82
|
+
text-align: var(--nutui-elevator-list-item-code-current-text-align, center);
|
|
74
83
|
}
|
|
75
|
-
.nut-
|
|
76
|
-
display: inline;
|
|
84
|
+
.nut-elevator-bars {
|
|
77
85
|
position: absolute;
|
|
78
|
-
|
|
79
|
-
top:
|
|
80
|
-
height: 30px;
|
|
81
|
-
line-height: 30px;
|
|
82
|
-
border-bottom: 0;
|
|
86
|
+
right: var(--nutui-elevator-bars-right, 10px);
|
|
87
|
+
top: var(--nutui-elevator-bars-top, 50%);
|
|
83
88
|
color: var(--nutui-color-text-help);
|
|
84
|
-
font-
|
|
89
|
+
font-size: var(--nutui-elevator-bars-font-size, var(--nutui-font-text-xs));
|
|
90
|
+
transform: var(--nutui-elevator-bars-transform, translateY(-50%));
|
|
91
|
+
padding: var(--nutui-elevator-bars-padding, 15px 0);
|
|
92
|
+
background-color: var(--nutui-elevator-bars-background-color, transparent);
|
|
93
|
+
border-radius: var(--nutui-elevator-bars-border-radius, 6px);
|
|
94
|
+
text-align: center;
|
|
95
|
+
z-index: var(--nutui-elevator-bars-z-index, 2);
|
|
85
96
|
}
|
|
86
|
-
.nut-
|
|
87
|
-
|
|
88
|
-
padding:
|
|
89
|
-
|
|
97
|
+
.nut-elevator-bars-inner-item {
|
|
98
|
+
display: block;
|
|
99
|
+
padding: var(--nutui-elevator-bars-inner-item-padding, 3px);
|
|
100
|
+
cursor: pointer;
|
|
90
101
|
}
|
|
91
|
-
.nut-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
102
|
+
.nut-elevator-bars-inner-item-active {
|
|
103
|
+
font-weight: var(--nutui-font-weight-bold);
|
|
104
|
+
color: var(--nutui-elevator-bars-active-color, var(--nutui-color-primary, #ff6666));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
[dir=rtl] .nut-elevator-list-fixed,
|
|
108
|
+
.nut-rtl .nut-elevator-list-fixed {
|
|
109
|
+
left: auto;
|
|
110
|
+
right: 0;
|
|
111
|
+
}
|
|
112
|
+
[dir=rtl] .nut-elevator-code-current,
|
|
113
|
+
.nut-rtl .nut-elevator-code-current {
|
|
114
|
+
right: auto;
|
|
115
|
+
left: var(--nutui-elevator-list-item-code-current-right, 40px);
|
|
101
116
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
117
|
+
[dir=rtl] .nut-elevator-bars,
|
|
118
|
+
.nut-rtl .nut-elevator-bars {
|
|
119
|
+
right: auto;
|
|
120
|
+
left: var(--nutui-elevator-bars-right, 10px);
|
|
106
121
|
}
|
|
@@ -28,7 +28,7 @@ var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typing
|
|
|
28
28
|
});
|
|
29
29
|
var Progress = function Progress(props) {
|
|
30
30
|
var rtl = (0, _configprovider.useRtl)();
|
|
31
|
-
var _ref = (0, _object_spread._)({}, defaultProps, props), className = _ref.className, style = _ref.style, percent = _ref.percent, background = _ref.background, color = _ref.color, strokeWidth = _ref.strokeWidth, showText = _ref.showText, animated = _ref.animated, children = _ref.children, lazy = _ref.lazy, delay = _ref.delay, rest = (0, _object_without_properties._)(_ref, [
|
|
31
|
+
var _ref = (0, _object_spread._)({}, defaultProps, props), className = _ref.className, style = _ref.style, percent = _ref.percent, background = _ref.background, color = _ref.color, strokeWidth = _ref.strokeWidth, showText = _ref.showText, animated = _ref.animated, children = _ref.children, lazy = _ref.lazy, delay = _ref.delay, borderRadius = _ref.borderRadius, fontSize = _ref.fontSize, activeMode = _ref.activeMode, duration = _ref.duration, ariaLabel = _ref.ariaLabel, onActiveEnd = _ref.onActiveEnd, rest = (0, _object_without_properties._)(_ref, [
|
|
32
32
|
"className",
|
|
33
33
|
"style",
|
|
34
34
|
"percent",
|
|
@@ -39,24 +39,48 @@ var Progress = function Progress(props) {
|
|
|
39
39
|
"animated",
|
|
40
40
|
"children",
|
|
41
41
|
"lazy",
|
|
42
|
-
"delay"
|
|
42
|
+
"delay",
|
|
43
|
+
"borderRadius",
|
|
44
|
+
"fontSize",
|
|
45
|
+
"activeMode",
|
|
46
|
+
"duration",
|
|
47
|
+
"ariaLabel",
|
|
48
|
+
"onActiveEnd"
|
|
43
49
|
]);
|
|
44
50
|
var classPrefix = 'nut-progress';
|
|
45
51
|
var _obj;
|
|
46
52
|
var classesInner = (0, _classnames.default)((_obj = {}, (0, _define_property._)(_obj, "".concat(classPrefix, "-inner"), true), (0, _define_property._)(_obj, "".concat(classPrefix, "-active"), animated), _obj));
|
|
47
53
|
var stylesOuter = {
|
|
48
54
|
height: "".concat(strokeWidth, "px"),
|
|
55
|
+
borderRadius: borderRadius && parseInt(borderRadius.toString()),
|
|
49
56
|
background: background
|
|
50
57
|
};
|
|
51
58
|
var _useState = (0, _sliced_to_array._)((0, _react.useState)(0), 2), displayPercent = _useState[0], setDispalyPercent = _useState[1];
|
|
52
59
|
var stylesInner = {
|
|
53
60
|
width: "".concat(displayPercent, "%"),
|
|
54
|
-
background: color || '#FF0F23'
|
|
61
|
+
background: color || '#FF0F23',
|
|
62
|
+
borderRadius: borderRadius && parseInt(borderRadius.toString()),
|
|
63
|
+
transition: "width ".concat(duration || 300, "ms ease-in-out")
|
|
55
64
|
};
|
|
56
65
|
(0, _react.useEffect)(function() {
|
|
57
|
-
|
|
66
|
+
var timer = null;
|
|
67
|
+
if (activeMode === 'backwards') {
|
|
68
|
+
setDispalyPercent(0);
|
|
69
|
+
timer = setTimeout(function() {
|
|
70
|
+
setDispalyPercent(percent);
|
|
71
|
+
}, duration || 300);
|
|
72
|
+
} else {
|
|
73
|
+
setDispalyPercent(percent);
|
|
74
|
+
}
|
|
75
|
+
return function() {
|
|
76
|
+
if (timer) {
|
|
77
|
+
clearTimeout(timer);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
58
80
|
}, [
|
|
59
|
-
percent
|
|
81
|
+
percent,
|
|
82
|
+
activeMode,
|
|
83
|
+
duration
|
|
60
84
|
]);
|
|
61
85
|
var _useState1 = (0, _sliced_to_array._)((0, _react.useState)(false), 2), intersecting = _useState1[0], setIntersecting = _useState1[1];
|
|
62
86
|
var progressRef = (0, _react.useRef)(null);
|
|
@@ -108,25 +132,22 @@ var Progress = function Progress(props) {
|
|
|
108
132
|
return /*#__PURE__*/ _react.default.createElement("div", (0, _object_spread._)({
|
|
109
133
|
ref: progressRef,
|
|
110
134
|
className: (0, _classnames.default)(classPrefix, className),
|
|
111
|
-
style: style
|
|
135
|
+
style: style,
|
|
136
|
+
"aria-label": ariaLabel
|
|
112
137
|
}, rest), /*#__PURE__*/ _react.default.createElement("div", {
|
|
113
138
|
className: "".concat(classPrefix, "-outer"),
|
|
114
139
|
style: stylesOuter
|
|
115
140
|
}, /*#__PURE__*/ _react.default.createElement("div", {
|
|
116
141
|
className: classesInner,
|
|
117
|
-
style: stylesInner
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
style: rtl ? {
|
|
121
|
-
right: "".concat(displayPercent, "%")
|
|
122
|
-
} : {
|
|
123
|
-
left: "".concat(displayPercent, "%")
|
|
142
|
+
style: stylesInner,
|
|
143
|
+
onTransitionEnd: function onTransitionEnd() {
|
|
144
|
+
onActiveEnd === null || onActiveEnd === void 0 ? void 0 : onActiveEnd();
|
|
124
145
|
}
|
|
125
|
-
},
|
|
126
|
-
className: "".concat(classPrefix, "-text
|
|
146
|
+
})), showText && /*#__PURE__*/ _react.default.createElement("div", {
|
|
147
|
+
className: "".concat(classPrefix, "-text"),
|
|
127
148
|
style: {
|
|
128
|
-
|
|
149
|
+
fontSize: fontSize && parseInt(fontSize.toString())
|
|
129
150
|
}
|
|
130
|
-
}, percent, "%")))
|
|
151
|
+
}, children || "".concat(percent, "%")));
|
|
131
152
|
};
|
|
132
153
|
Progress.displayName = 'NutProgress';
|
|
@@ -5,11 +5,10 @@
|
|
|
5
5
|
width: 100%;
|
|
6
6
|
|
|
7
7
|
&-outer {
|
|
8
|
-
flex:
|
|
8
|
+
flex: 1;
|
|
9
9
|
border-radius: $progress-border-radius;
|
|
10
10
|
height: $progress-height;
|
|
11
11
|
background: $progress-background;
|
|
12
|
-
|
|
13
12
|
.nut-progress-active:before {
|
|
14
13
|
content: '';
|
|
15
14
|
position: absolute;
|
|
@@ -35,26 +34,11 @@
|
|
|
35
34
|
&-text {
|
|
36
35
|
display: flex;
|
|
37
36
|
align-items: center;
|
|
38
|
-
position: absolute;
|
|
39
|
-
top: $progress-text-position-top;
|
|
40
|
-
bottom: $progress-text-position-bottom;
|
|
41
37
|
transition: all 0.4s;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
flex-direction: row;
|
|
47
|
-
justify-content: center;
|
|
48
|
-
align-items: center;
|
|
49
|
-
height: 100%;
|
|
50
|
-
width: 100%;
|
|
51
|
-
color: $progress-text-color;
|
|
52
|
-
padding: $progress-text-padding;
|
|
53
|
-
border-radius: $progress-text-border-radius;
|
|
54
|
-
font-size: $progress-text-font-size;
|
|
55
|
-
line-height: 1;
|
|
56
|
-
background: $progress-text-background;
|
|
57
|
-
}
|
|
38
|
+
margin-left: 12px;
|
|
39
|
+
color: $color-text-help;
|
|
40
|
+
font-family: PingFang SC;
|
|
41
|
+
font-size: $progress-text-font-size;
|
|
58
42
|
}
|
|
59
43
|
|
|
60
44
|
@keyframes progressActive {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
width: 100%;
|
|
10
10
|
}
|
|
11
11
|
.nut-progress-outer {
|
|
12
|
-
flex:
|
|
12
|
+
flex: 1;
|
|
13
13
|
border-radius: var(--nutui-progress-border-radius, 12px);
|
|
14
14
|
height: var(--nutui-progress-height, 10px);
|
|
15
15
|
background: var(--nutui-progress-background, var(--nutui-color-background, #f2f3f5));
|
|
@@ -36,25 +36,11 @@
|
|
|
36
36
|
.nut-progress-text {
|
|
37
37
|
display: flex;
|
|
38
38
|
align-items: center;
|
|
39
|
-
position: absolute;
|
|
40
|
-
top: var(--nutui-progress-text-position-top, -4px);
|
|
41
|
-
bottom: var(--nutui-progress-text-position-bottom, -4px);
|
|
42
39
|
transition: all 0.4s;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
flex-direction: row;
|
|
48
|
-
justify-content: center;
|
|
49
|
-
align-items: center;
|
|
50
|
-
height: 100%;
|
|
51
|
-
width: 100%;
|
|
52
|
-
color: var(--nutui-progress-text-color, #ffffff);
|
|
53
|
-
padding: var(--nutui-progress-text-padding, 0 5px);
|
|
54
|
-
border-radius: var(--nutui-progress-text-border-radius, 5px);
|
|
55
|
-
font-size: var(--nutui-progress-text-font-size, 9px);
|
|
56
|
-
line-height: 1;
|
|
57
|
-
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%));
|
|
40
|
+
margin-left: 12px;
|
|
41
|
+
color: var(--nutui-color-text-help, #888b94);
|
|
42
|
+
font-family: PingFang SC;
|
|
43
|
+
font-size: var(--nutui-progress-text-font-size, 13px);
|
|
58
44
|
}
|
|
59
45
|
@keyframes progressActive {
|
|
60
46
|
0% {
|
|
@@ -5,11 +5,10 @@
|
|
|
5
5
|
width: 100%;
|
|
6
6
|
|
|
7
7
|
&-outer {
|
|
8
|
-
flex:
|
|
8
|
+
flex: 1;
|
|
9
9
|
border-radius: $progress-border-radius;
|
|
10
10
|
height: $progress-height;
|
|
11
11
|
background: $progress-background;
|
|
12
|
-
|
|
13
12
|
.nut-progress-active:before {
|
|
14
13
|
content: '';
|
|
15
14
|
position: absolute;
|
|
@@ -35,26 +34,11 @@
|
|
|
35
34
|
&-text {
|
|
36
35
|
display: flex;
|
|
37
36
|
align-items: center;
|
|
38
|
-
position: absolute;
|
|
39
|
-
top: $progress-text-position-top;
|
|
40
|
-
bottom: $progress-text-position-bottom;
|
|
41
37
|
transition: all 0.4s;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
flex-direction: row;
|
|
47
|
-
justify-content: center;
|
|
48
|
-
align-items: center;
|
|
49
|
-
height: 100%;
|
|
50
|
-
width: 100%;
|
|
51
|
-
color: $progress-text-color;
|
|
52
|
-
padding: $progress-text-padding;
|
|
53
|
-
border-radius: $progress-text-border-radius;
|
|
54
|
-
font-size: $progress-text-font-size;
|
|
55
|
-
line-height: 1;
|
|
56
|
-
background: $progress-text-background;
|
|
57
|
-
}
|
|
38
|
+
margin-left: 12px;
|
|
39
|
+
color: $color-text-help;
|
|
40
|
+
font-family: PingFang SC;
|
|
41
|
+
font-size: $progress-text-font-size;
|
|
58
42
|
}
|
|
59
43
|
|
|
60
44
|
@keyframes progressActive {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
width: 100%;
|
|
10
10
|
}
|
|
11
11
|
.nut-progress-outer {
|
|
12
|
-
flex:
|
|
12
|
+
flex: 1;
|
|
13
13
|
border-radius: var(--nutui-progress-border-radius, 12px);
|
|
14
14
|
height: var(--nutui-progress-height, 10px);
|
|
15
15
|
background: var(--nutui-progress-background, var(--nutui-color-surface-1));
|
|
@@ -36,25 +36,11 @@
|
|
|
36
36
|
.nut-progress-text {
|
|
37
37
|
display: flex;
|
|
38
38
|
align-items: center;
|
|
39
|
-
position: absolute;
|
|
40
|
-
top: var(--nutui-progress-text-position-top, -4px);
|
|
41
|
-
bottom: var(--nutui-progress-text-position-bottom, -4px);
|
|
42
39
|
transition: all 0.4s;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
display: flex;
|
|
47
|
-
flex-direction: row;
|
|
48
|
-
justify-content: center;
|
|
49
|
-
align-items: center;
|
|
50
|
-
height: 100%;
|
|
51
|
-
width: 100%;
|
|
52
|
-
color: var(--nutui-progress-text-color, var(--nutui-color-text-dark));
|
|
53
|
-
padding: var(--nutui-progress-text-padding, 0 5px);
|
|
54
|
-
border-radius: var(--nutui-progress-text-border-radius, 5px);
|
|
40
|
+
margin-left: 12px;
|
|
41
|
+
color: var(--nutui-color-text-help);
|
|
42
|
+
font-family: PingFang SC;
|
|
55
43
|
font-size: var(--nutui-progress-text-font-size, 9px);
|
|
56
|
-
line-height: 1;
|
|
57
|
-
background: var(--nutui-progress-text-background, #ff0f23);
|
|
58
44
|
}
|
|
59
45
|
@keyframes progressActive {
|
|
60
46
|
0% {
|
|
@@ -5,11 +5,10 @@
|
|
|
5
5
|
width: 100%;
|
|
6
6
|
|
|
7
7
|
&-outer {
|
|
8
|
-
flex:
|
|
8
|
+
flex: 1;
|
|
9
9
|
border-radius: $progress-border-radius;
|
|
10
10
|
height: $progress-height;
|
|
11
11
|
background: $progress-background;
|
|
12
|
-
|
|
13
12
|
.nut-progress-active:before {
|
|
14
13
|
content: '';
|
|
15
14
|
position: absolute;
|
|
@@ -35,26 +34,11 @@
|
|
|
35
34
|
&-text {
|
|
36
35
|
display: flex;
|
|
37
36
|
align-items: center;
|
|
38
|
-
position: absolute;
|
|
39
|
-
top: $progress-text-position-top;
|
|
40
|
-
bottom: $progress-text-position-bottom;
|
|
41
37
|
transition: all 0.4s;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
flex-direction: row;
|
|
47
|
-
justify-content: center;
|
|
48
|
-
align-items: center;
|
|
49
|
-
height: 100%;
|
|
50
|
-
width: 100%;
|
|
51
|
-
color: $progress-text-color;
|
|
52
|
-
padding: $progress-text-padding;
|
|
53
|
-
border-radius: $progress-text-border-radius;
|
|
54
|
-
font-size: $progress-text-font-size;
|
|
55
|
-
line-height: 1;
|
|
56
|
-
background: $progress-text-background;
|
|
57
|
-
}
|
|
38
|
+
margin-left: 12px;
|
|
39
|
+
color: $color-text-help;
|
|
40
|
+
font-family: PingFang SC;
|
|
41
|
+
font-size: $progress-text-font-size;
|
|
58
42
|
}
|
|
59
43
|
|
|
60
44
|
@keyframes progressActive {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
width: 100%;
|
|
10
10
|
}
|
|
11
11
|
.nut-progress-outer {
|
|
12
|
-
flex:
|
|
12
|
+
flex: 1;
|
|
13
13
|
border-radius: var(--nutui-progress-border-radius, 12px);
|
|
14
14
|
height: var(--nutui-progress-height, 10px);
|
|
15
15
|
background: var(--nutui-progress-background, var(--nutui-color-surface-1));
|
|
@@ -36,25 +36,11 @@
|
|
|
36
36
|
.nut-progress-text {
|
|
37
37
|
display: flex;
|
|
38
38
|
align-items: center;
|
|
39
|
-
position: absolute;
|
|
40
|
-
top: var(--nutui-progress-text-position-top, -4px);
|
|
41
|
-
bottom: var(--nutui-progress-text-position-bottom, -4px);
|
|
42
39
|
transition: all 0.4s;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
display: flex;
|
|
47
|
-
flex-direction: row;
|
|
48
|
-
justify-content: center;
|
|
49
|
-
align-items: center;
|
|
50
|
-
height: 100%;
|
|
51
|
-
width: 100%;
|
|
52
|
-
color: var(--nutui-progress-text-color, var(--nutui-color-text-dark));
|
|
53
|
-
padding: var(--nutui-progress-text-padding, 0 5px);
|
|
54
|
-
border-radius: var(--nutui-progress-text-border-radius, 5px);
|
|
40
|
+
margin-left: 12px;
|
|
41
|
+
color: var(--nutui-color-text-help);
|
|
42
|
+
font-family: PingFang SC;
|
|
55
43
|
font-size: var(--nutui-progress-text-font-size, 9px);
|
|
56
|
-
line-height: 1;
|
|
57
|
-
background: var(--nutui-progress-text-background, var(--nutui-progress-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff9999) 0%, var(--nutui-color-primary-stop-2, #ff6666) 100%)));
|
|
58
44
|
}
|
|
59
45
|
@keyframes progressActive {
|
|
60
46
|
0% {
|
|
@@ -233,10 +233,8 @@ var Range = function Range(props) {
|
|
|
233
233
|
onEnd,
|
|
234
234
|
setCurrent
|
|
235
235
|
]);
|
|
236
|
-
var
|
|
237
|
-
if (disabled || !root.current)
|
|
238
|
-
return;
|
|
239
|
-
}
|
|
236
|
+
var handleClick = (0, _react.useCallback)(function(event) {
|
|
237
|
+
if (disabled || !root.current) return;
|
|
240
238
|
setDragStatus('');
|
|
241
239
|
var rect = (0, _getrect.getRect)(root.current);
|
|
242
240
|
var delta = event.clientX - rect.left;
|
|
@@ -274,9 +272,7 @@ var Range = function Range(props) {
|
|
|
274
272
|
vertical
|
|
275
273
|
]);
|
|
276
274
|
var onTouchStart = (0, _react.useCallback)(function(event) {
|
|
277
|
-
if (disabled)
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
275
|
+
if (disabled) return;
|
|
280
276
|
touch.start(event);
|
|
281
277
|
setExactValue(current);
|
|
282
278
|
if (isRange(current)) {
|
|
@@ -489,11 +485,9 @@ var Range = function Range(props) {
|
|
|
489
485
|
}, minDescription || min), /*#__PURE__*/ _react.default.createElement("div", {
|
|
490
486
|
ref: root,
|
|
491
487
|
className: classes,
|
|
492
|
-
onClick:
|
|
493
|
-
return click(e);
|
|
494
|
-
}
|
|
488
|
+
onClick: handleClick
|
|
495
489
|
}, renderMarks(), /*#__PURE__*/ _react.default.createElement("div", {
|
|
496
|
-
className: "".concat(classPrefix, "-bar"),
|
|
490
|
+
className: "".concat(classPrefix, "-bar ").concat(classPrefix, "-bar-animate"),
|
|
497
491
|
style: barStyle()
|
|
498
492
|
}, renderButtonWrapper())), maxDescription !== null && /*#__PURE__*/ _react.default.createElement("div", {
|
|
499
493
|
className: "".concat(classPrefix, "-max")
|
|
@@ -46,7 +46,10 @@
|
|
|
46
46
|
max-height: 100%;
|
|
47
47
|
background: $range-active-color;
|
|
48
48
|
border-radius: 2px;
|
|
49
|
-
|
|
49
|
+
|
|
50
|
+
&-animate {
|
|
51
|
+
transition: all 0.2s;
|
|
52
|
+
}
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
&-button {
|
|
@@ -204,7 +207,8 @@
|
|
|
204
207
|
position: absolute;
|
|
205
208
|
width: 36px;
|
|
206
209
|
height: 100%;
|
|
207
|
-
top: initial;
|
|
210
|
+
// top: initial;
|
|
211
|
+
top: 0px;
|
|
208
212
|
right: 50%;
|
|
209
213
|
overflow: visible;
|
|
210
214
|
font-size: 12px;
|
|
@@ -45,6 +45,8 @@
|
|
|
45
45
|
max-height: 100%;
|
|
46
46
|
background: var(--nutui-range-active-color, var(--nutui-color-primary, #ff0f23));
|
|
47
47
|
border-radius: 2px;
|
|
48
|
+
}
|
|
49
|
+
.nut-range-bar-animate {
|
|
48
50
|
transition: all 0.2s;
|
|
49
51
|
}
|
|
50
52
|
.nut-range-button {
|
|
@@ -173,7 +175,7 @@
|
|
|
173
175
|
position: absolute;
|
|
174
176
|
width: 36px;
|
|
175
177
|
height: 100%;
|
|
176
|
-
top:
|
|
178
|
+
top: 0px;
|
|
177
179
|
right: 50%;
|
|
178
180
|
overflow: visible;
|
|
179
181
|
font-size: 12px;
|
|
@@ -46,7 +46,10 @@
|
|
|
46
46
|
max-height: 100%;
|
|
47
47
|
background: $range-active-color;
|
|
48
48
|
border-radius: 2px;
|
|
49
|
-
|
|
49
|
+
|
|
50
|
+
&-animate {
|
|
51
|
+
transition: all 0.2s;
|
|
52
|
+
}
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
&-button {
|
|
@@ -204,7 +207,8 @@
|
|
|
204
207
|
position: absolute;
|
|
205
208
|
width: 36px;
|
|
206
209
|
height: 100%;
|
|
207
|
-
top: initial;
|
|
210
|
+
// top: initial;
|
|
211
|
+
top: 0px;
|
|
208
212
|
right: 50%;
|
|
209
213
|
overflow: visible;
|
|
210
214
|
font-size: 12px;
|
|
@@ -45,6 +45,8 @@
|
|
|
45
45
|
max-height: 100%;
|
|
46
46
|
background: var(--nutui-range-active-color, var(--nutui-color-primary));
|
|
47
47
|
border-radius: 2px;
|
|
48
|
+
}
|
|
49
|
+
.nut-range-bar-animate {
|
|
48
50
|
transition: all 0.2s;
|
|
49
51
|
}
|
|
50
52
|
.nut-range-button {
|
|
@@ -173,7 +175,7 @@
|
|
|
173
175
|
position: absolute;
|
|
174
176
|
width: 36px;
|
|
175
177
|
height: 100%;
|
|
176
|
-
top:
|
|
178
|
+
top: 0px;
|
|
177
179
|
right: 50%;
|
|
178
180
|
overflow: visible;
|
|
179
181
|
font-size: 12px;
|