@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
|
@@ -16,7 +16,7 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
|
16
16
|
});
|
|
17
17
|
export var Progress = function(props) {
|
|
18
18
|
var rtl = useRtl();
|
|
19
|
-
var _ref = _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 = _object_without_properties(_ref, [
|
|
19
|
+
var _ref = _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 = _object_without_properties(_ref, [
|
|
20
20
|
"className",
|
|
21
21
|
"style",
|
|
22
22
|
"percent",
|
|
@@ -27,24 +27,48 @@ export var Progress = function(props) {
|
|
|
27
27
|
"animated",
|
|
28
28
|
"children",
|
|
29
29
|
"lazy",
|
|
30
|
-
"delay"
|
|
30
|
+
"delay",
|
|
31
|
+
"borderRadius",
|
|
32
|
+
"fontSize",
|
|
33
|
+
"activeMode",
|
|
34
|
+
"duration",
|
|
35
|
+
"ariaLabel",
|
|
36
|
+
"onActiveEnd"
|
|
31
37
|
]);
|
|
32
38
|
var classPrefix = 'nut-progress';
|
|
33
39
|
var _obj;
|
|
34
40
|
var classesInner = classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix, "-inner"), true), _define_property(_obj, "".concat(classPrefix, "-active"), animated), _obj));
|
|
35
41
|
var stylesOuter = {
|
|
36
42
|
height: "".concat(strokeWidth, "px"),
|
|
43
|
+
borderRadius: borderRadius && parseInt(borderRadius.toString()),
|
|
37
44
|
background: background
|
|
38
45
|
};
|
|
39
46
|
var _useState = _sliced_to_array(useState(0), 2), displayPercent = _useState[0], setDispalyPercent = _useState[1];
|
|
40
47
|
var stylesInner = {
|
|
41
48
|
width: "".concat(displayPercent, "%"),
|
|
42
|
-
background: color || '#FF0F23'
|
|
49
|
+
background: color || '#FF0F23',
|
|
50
|
+
borderRadius: borderRadius && parseInt(borderRadius.toString()),
|
|
51
|
+
transition: "width ".concat(duration || 300, "ms ease-in-out")
|
|
43
52
|
};
|
|
44
53
|
useEffect(function() {
|
|
45
|
-
|
|
54
|
+
var timer = null;
|
|
55
|
+
if (activeMode === 'backwards') {
|
|
56
|
+
setDispalyPercent(0);
|
|
57
|
+
timer = setTimeout(function() {
|
|
58
|
+
setDispalyPercent(percent);
|
|
59
|
+
}, duration || 300);
|
|
60
|
+
} else {
|
|
61
|
+
setDispalyPercent(percent);
|
|
62
|
+
}
|
|
63
|
+
return function() {
|
|
64
|
+
if (timer) {
|
|
65
|
+
clearTimeout(timer);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
46
68
|
}, [
|
|
47
|
-
percent
|
|
69
|
+
percent,
|
|
70
|
+
activeMode,
|
|
71
|
+
duration
|
|
48
72
|
]);
|
|
49
73
|
var _useState1 = _sliced_to_array(useState(false), 2), intersecting = _useState1[0], setIntersecting = _useState1[1];
|
|
50
74
|
var progressRef = useRef(null);
|
|
@@ -96,25 +120,22 @@ export var Progress = function(props) {
|
|
|
96
120
|
return /*#__PURE__*/ React.createElement("div", _object_spread({
|
|
97
121
|
ref: progressRef,
|
|
98
122
|
className: classNames(classPrefix, className),
|
|
99
|
-
style: style
|
|
123
|
+
style: style,
|
|
124
|
+
"aria-label": ariaLabel
|
|
100
125
|
}, rest), /*#__PURE__*/ React.createElement("div", {
|
|
101
126
|
className: "".concat(classPrefix, "-outer"),
|
|
102
127
|
style: stylesOuter
|
|
103
128
|
}, /*#__PURE__*/ React.createElement("div", {
|
|
104
129
|
className: classesInner,
|
|
105
|
-
style: stylesInner
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
style: rtl ? {
|
|
109
|
-
right: "".concat(displayPercent, "%")
|
|
110
|
-
} : {
|
|
111
|
-
left: "".concat(displayPercent, "%")
|
|
130
|
+
style: stylesInner,
|
|
131
|
+
onTransitionEnd: function() {
|
|
132
|
+
onActiveEnd === null || onActiveEnd === void 0 ? void 0 : onActiveEnd();
|
|
112
133
|
}
|
|
113
|
-
},
|
|
114
|
-
className: "".concat(classPrefix, "-text
|
|
134
|
+
})), showText && /*#__PURE__*/ React.createElement("div", {
|
|
135
|
+
className: "".concat(classPrefix, "-text"),
|
|
115
136
|
style: {
|
|
116
|
-
|
|
137
|
+
fontSize: fontSize && parseInt(fontSize.toString())
|
|
117
138
|
}
|
|
118
|
-
}, percent, "%")))
|
|
139
|
+
}, children || "".concat(percent, "%")));
|
|
119
140
|
};
|
|
120
141
|
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% {
|
|
@@ -221,10 +221,8 @@ export var Range = function(props) {
|
|
|
221
221
|
onEnd,
|
|
222
222
|
setCurrent
|
|
223
223
|
]);
|
|
224
|
-
var
|
|
225
|
-
if (disabled || !root.current)
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
224
|
+
var handleClick = useCallback(function(event) {
|
|
225
|
+
if (disabled || !root.current) return;
|
|
228
226
|
setDragStatus('');
|
|
229
227
|
var rect = getRect(root.current);
|
|
230
228
|
var delta = event.clientX - rect.left;
|
|
@@ -262,9 +260,7 @@ export var Range = function(props) {
|
|
|
262
260
|
vertical
|
|
263
261
|
]);
|
|
264
262
|
var onTouchStart = useCallback(function(event) {
|
|
265
|
-
if (disabled)
|
|
266
|
-
return;
|
|
267
|
-
}
|
|
263
|
+
if (disabled) return;
|
|
268
264
|
touch.start(event);
|
|
269
265
|
setExactValue(current);
|
|
270
266
|
if (isRange(current)) {
|
|
@@ -477,11 +473,9 @@ export var Range = function(props) {
|
|
|
477
473
|
}, minDescription || min), /*#__PURE__*/ React.createElement("div", {
|
|
478
474
|
ref: root,
|
|
479
475
|
className: classes,
|
|
480
|
-
onClick:
|
|
481
|
-
return click(e);
|
|
482
|
-
}
|
|
476
|
+
onClick: handleClick
|
|
483
477
|
}, renderMarks(), /*#__PURE__*/ React.createElement("div", {
|
|
484
|
-
className: "".concat(classPrefix, "-bar"),
|
|
478
|
+
className: "".concat(classPrefix, "-bar ").concat(classPrefix, "-bar-animate"),
|
|
485
479
|
style: barStyle()
|
|
486
480
|
}, renderButtonWrapper())), maxDescription !== null && /*#__PURE__*/ React.createElement("div", {
|
|
487
481
|
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;
|
|
@@ -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, #ff6666));
|
|
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;
|