@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.
Files changed (134) hide show
  1. package/CHANGELOG.md +20 -7
  2. package/dist/cjs/packages/address/style/address.scss +114 -0
  3. package/dist/cjs/packages/address/style/style.css +103 -0
  4. package/dist/cjs/packages/address/style-jmapp/address.scss +114 -0
  5. package/dist/cjs/packages/address/style-jmapp/style.css +103 -0
  6. package/dist/cjs/packages/address/style-jrkf/address.scss +114 -0
  7. package/dist/cjs/packages/address/style-jrkf/style.css +103 -0
  8. package/dist/cjs/packages/configprovider/types.d.ts +1 -1
  9. package/dist/cjs/packages/elevator/style/css.js +0 -2
  10. package/dist/cjs/packages/elevator/style/elevator.scss +116 -95
  11. package/dist/cjs/packages/elevator/style/index.js +0 -2
  12. package/dist/cjs/packages/elevator/style/style.css +98 -83
  13. package/dist/cjs/packages/elevator/style-jmapp/css.js +0 -2
  14. package/dist/cjs/packages/elevator/style-jmapp/elevator.scss +116 -95
  15. package/dist/cjs/packages/elevator/style-jmapp/index.js +0 -2
  16. package/dist/cjs/packages/elevator/style-jmapp/style.css +98 -83
  17. package/dist/cjs/packages/elevator/style-jrkf/css.js +0 -2
  18. package/dist/cjs/packages/elevator/style-jrkf/elevator.scss +116 -95
  19. package/dist/cjs/packages/elevator/style-jrkf/index.js +0 -2
  20. package/dist/cjs/packages/elevator/style-jrkf/style.css +98 -83
  21. package/dist/cjs/packages/progress/progress.js +38 -17
  22. package/dist/cjs/packages/progress/style/progress.scss +5 -21
  23. package/dist/cjs/packages/progress/style/style.css +5 -19
  24. package/dist/cjs/packages/progress/style-jmapp/progress.scss +5 -21
  25. package/dist/cjs/packages/progress/style-jmapp/style.css +4 -18
  26. package/dist/cjs/packages/progress/style-jrkf/progress.scss +5 -21
  27. package/dist/cjs/packages/progress/style-jrkf/style.css +4 -18
  28. package/dist/cjs/packages/range/range.js +5 -11
  29. package/dist/cjs/packages/range/style/range.scss +6 -2
  30. package/dist/cjs/packages/range/style/style.css +3 -1
  31. package/dist/cjs/packages/range/style-jmapp/range.scss +6 -2
  32. package/dist/cjs/packages/range/style-jmapp/style.css +3 -1
  33. package/dist/cjs/packages/range/style-jrkf/range.scss +6 -2
  34. package/dist/cjs/packages/range/style-jrkf/style.css +3 -1
  35. package/dist/cjs/packages/range/utils.d.ts +3 -0
  36. package/dist/cjs/packages/range/utils.js +24 -0
  37. package/dist/cjs/packages/searchbar/searchbar.js +162 -87
  38. package/dist/cjs/packages/searchbar/style/searchbar.scss +99 -25
  39. package/dist/cjs/packages/searchbar/style/style.css +102 -38
  40. package/dist/cjs/packages/searchbar/style-jmapp/searchbar.scss +99 -25
  41. package/dist/cjs/packages/searchbar/style-jmapp/style.css +85 -21
  42. package/dist/cjs/packages/searchbar/style-jrkf/searchbar.scss +99 -25
  43. package/dist/cjs/packages/searchbar/style-jrkf/style.css +85 -21
  44. package/dist/cjs/packages/step/step.js +74 -33
  45. package/dist/cjs/packages/step/style/step.scss +104 -195
  46. package/dist/cjs/packages/step/style/style.css +85 -159
  47. package/dist/cjs/packages/step/style-jmapp/step.scss +104 -195
  48. package/dist/cjs/packages/step/style-jmapp/style.css +88 -162
  49. package/dist/cjs/packages/step/style-jrkf/step.scss +104 -195
  50. package/dist/cjs/packages/step/style-jrkf/style.css +88 -162
  51. package/dist/cjs/packages/steps/steps.js +23 -8
  52. package/dist/cjs/packages/steps/style/steps.scss +328 -4
  53. package/dist/cjs/packages/steps/style/style.css +219 -2
  54. package/dist/cjs/packages/steps/style-jmapp/steps.scss +328 -4
  55. package/dist/cjs/packages/steps/style-jmapp/style.css +219 -2
  56. package/dist/cjs/packages/steps/style-jrkf/steps.scss +328 -4
  57. package/dist/cjs/packages/steps/style-jrkf/style.css +219 -2
  58. package/dist/cjs/packages/uploader/uploader.js +20 -9
  59. package/dist/cjs/types/spec/progress/base.d.ts +6 -0
  60. package/dist/cjs/types/spec/progress/taro.d.ts +4 -0
  61. package/dist/cjs/types/spec/searchbar/base.d.ts +3 -0
  62. package/dist/cjs/types/spec/steps/base.d.ts +11 -2
  63. package/dist/es/packages/address/style/address.scss +114 -0
  64. package/dist/es/packages/address/style/style.css +103 -0
  65. package/dist/es/packages/address/style-jmapp/address.scss +114 -0
  66. package/dist/es/packages/address/style-jmapp/style.css +103 -0
  67. package/dist/es/packages/address/style-jrkf/address.scss +114 -0
  68. package/dist/es/packages/address/style-jrkf/style.css +103 -0
  69. package/dist/es/packages/configprovider/types.d.ts +1 -1
  70. package/dist/es/packages/elevator/style/css.js +0 -2
  71. package/dist/es/packages/elevator/style/elevator.scss +116 -95
  72. package/dist/es/packages/elevator/style/index.js +0 -2
  73. package/dist/es/packages/elevator/style/style.css +98 -83
  74. package/dist/es/packages/elevator/style-jmapp/css.js +0 -2
  75. package/dist/es/packages/elevator/style-jmapp/elevator.scss +116 -95
  76. package/dist/es/packages/elevator/style-jmapp/index.js +0 -2
  77. package/dist/es/packages/elevator/style-jmapp/style.css +98 -83
  78. package/dist/es/packages/elevator/style-jrkf/css.js +0 -2
  79. package/dist/es/packages/elevator/style-jrkf/elevator.scss +116 -95
  80. package/dist/es/packages/elevator/style-jrkf/index.js +0 -2
  81. package/dist/es/packages/elevator/style-jrkf/style.css +98 -83
  82. package/dist/es/packages/progress/progress.js +38 -17
  83. package/dist/es/packages/progress/style/progress.scss +5 -21
  84. package/dist/es/packages/progress/style/style.css +5 -19
  85. package/dist/es/packages/progress/style-jmapp/progress.scss +5 -21
  86. package/dist/es/packages/progress/style-jmapp/style.css +4 -18
  87. package/dist/es/packages/progress/style-jrkf/progress.scss +5 -21
  88. package/dist/es/packages/progress/style-jrkf/style.css +4 -18
  89. package/dist/es/packages/range/range.js +5 -11
  90. package/dist/es/packages/range/style/range.scss +6 -2
  91. package/dist/es/packages/range/style/style.css +3 -1
  92. package/dist/es/packages/range/style-jmapp/range.scss +6 -2
  93. package/dist/es/packages/range/style-jmapp/style.css +3 -1
  94. package/dist/es/packages/range/style-jrkf/range.scss +6 -2
  95. package/dist/es/packages/range/style-jrkf/style.css +3 -1
  96. package/dist/es/packages/range/utils.d.ts +3 -0
  97. package/dist/es/packages/range/utils.js +6 -0
  98. package/dist/es/packages/searchbar/searchbar.js +163 -89
  99. package/dist/es/packages/searchbar/style/searchbar.scss +99 -25
  100. package/dist/es/packages/searchbar/style/style.css +102 -38
  101. package/dist/es/packages/searchbar/style-jmapp/searchbar.scss +99 -25
  102. package/dist/es/packages/searchbar/style-jmapp/style.css +85 -21
  103. package/dist/es/packages/searchbar/style-jrkf/searchbar.scss +99 -25
  104. package/dist/es/packages/searchbar/style-jrkf/style.css +85 -21
  105. package/dist/es/packages/step/step.js +75 -34
  106. package/dist/es/packages/step/style/step.scss +104 -195
  107. package/dist/es/packages/step/style/style.css +85 -159
  108. package/dist/es/packages/step/style-jmapp/step.scss +104 -195
  109. package/dist/es/packages/step/style-jmapp/style.css +88 -162
  110. package/dist/es/packages/step/style-jrkf/step.scss +104 -195
  111. package/dist/es/packages/step/style-jrkf/style.css +88 -162
  112. package/dist/es/packages/steps/steps.js +23 -8
  113. package/dist/es/packages/steps/style/steps.scss +328 -4
  114. package/dist/es/packages/steps/style/style.css +219 -2
  115. package/dist/es/packages/steps/style-jmapp/steps.scss +328 -4
  116. package/dist/es/packages/steps/style-jmapp/style.css +219 -2
  117. package/dist/es/packages/steps/style-jrkf/steps.scss +328 -4
  118. package/dist/es/packages/steps/style-jrkf/style.css +219 -2
  119. package/dist/es/packages/uploader/uploader.js +20 -9
  120. package/dist/es/types/spec/progress/base.d.ts +24 -0
  121. package/dist/es/types/spec/progress/taro.d.ts +4 -0
  122. package/dist/es/types/spec/searchbar/base.d.ts +10 -1
  123. package/dist/es/types/spec/steps/base.d.ts +26 -5
  124. package/dist/nutui.react.umd.js +317 -167
  125. package/dist/style-jmapp.css +1 -1
  126. package/dist/style-jmapp.scss +44 -44
  127. package/dist/style-jrkf.css +1 -1
  128. package/dist/style-jrkf.scss +46 -46
  129. package/dist/style.css +1 -1
  130. package/dist/style.scss +37 -37
  131. package/dist/styles/variables-jmapp.scss +133 -79
  132. package/dist/styles/variables-jrkf.scss +134 -80
  133. package/dist/styles/variables.scss +148 -89
  134. package/package.json +1 -1
@@ -2,105 +2,120 @@
2
2
  /* #endif */
3
3
  /* #ifndef harmony */
4
4
  /* #endif */
5
- .nut-address-title {
6
- font-size: 14px;
7
- font-weight: 500;
8
- padding: 16px 16px 12px 16px;
5
+ .nut-elevator {
6
+ width: 100%;
7
+ display: block;
8
+ position: relative;
9
+ overflow: hidden;
9
10
  }
10
- .nut-address-hotlist {
11
- padding: 0 16px;
12
- display: flex;
13
- flex-wrap: wrap;
14
- align-items: flex-start;
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-address-hotlist-item {
17
- display: flex;
18
- justify-content: center;
19
- align-items: center;
20
- width: 63px;
21
- height: 28px;
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-address-hotlist-item:nth-child(5n) {
35
- margin-right: 0;
26
+ .nut-elevator-list-item {
27
+ display: block;
36
28
  }
37
- .nut-address-hotlist.hotlist-more .nut-address-hotlist-item {
38
- width: auto;
39
- padding: 0 16px;
40
- margin-right: 7px;
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-address-selected {
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
- border-bottom: 1px solid var(--nutui-color-border);
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-address-selected-item {
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-address-selected-border {
65
- margin: 0 2px;
66
- color: var(--nutui-color-text-disabled);
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-address-elevator {
69
- margin-top: 0;
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-address-elevator .nut-elevator-list-item {
72
- position: relative;
73
- padding-left: 20px;
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-address-elevator .nut-elevator-list-item-code {
76
- display: inline;
84
+ .nut-elevator-bars {
77
85
  position: absolute;
78
- left: 0;
79
- top: 0;
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-weight: 500;
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-address-elevator .nut-elevator-bars {
87
- top: 40%;
88
- padding: 0;
89
- background: none;
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-address-elevator .nut-elevator-bars-inner-item {
92
- display: flex;
93
- justify-content: center;
94
- align-items: center;
95
- width: 16px;
96
- height: 16px;
97
- font-size: 10px;
98
- border-radius: 16px;
99
- margin-bottom: 2px;
100
- color: var(--nutui-color-text-help);
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
- .nut-address-elevator .nut-elevator-bars-inner-item-active {
103
- background-color: var(--nutui-color-primary, #ff6666);
104
- color: var(--nutui-color-surface-2);
105
- font-weight: 400;
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
- setDispalyPercent(percent);
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
- }, showText && /*#__PURE__*/ _react.default.createElement("div", {
119
- className: "".concat(classPrefix, "-text"),
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
- }, children || /*#__PURE__*/ _react.default.createElement("div", {
126
- className: "".concat(classPrefix, "-text-inner"),
146
+ })), showText && /*#__PURE__*/ _react.default.createElement("div", {
147
+ className: "".concat(classPrefix, "-text"),
127
148
  style: {
128
- background: color
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: auto;
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
- transform: translate(-50%);
43
-
44
- &-inner {
45
- display: flex;
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: auto;
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
- transform: translate(-50%);
44
- }
45
- .nut-progress-text-inner {
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, #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: auto;
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
- transform: translate(-50%);
43
-
44
- &-inner {
45
- display: flex;
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: auto;
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
- transform: translate(-50%);
44
- }
45
- .nut-progress-text-inner {
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: auto;
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
- transform: translate(-50%);
43
-
44
- &-inner {
45
- display: flex;
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: auto;
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
- transform: translate(-50%);
44
- }
45
- .nut-progress-text-inner {
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 click = (0, _react.useCallback)(function(event) {
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: function onClick(e) {
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
- transition: all 0.2s;
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: initial;
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
- transition: all 0.2s;
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: initial;
178
+ top: 0px;
177
179
  right: 50%;
178
180
  overflow: visible;
179
181
  font-size: 12px;