@nutui/nutui-react 3.0.11-patch.0 → 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 (98) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/packages/configprovider/types.d.ts +1 -1
  3. package/dist/cjs/packages/progress/progress.js +38 -17
  4. package/dist/cjs/packages/progress/style/progress.scss +5 -21
  5. package/dist/cjs/packages/progress/style/style.css +5 -19
  6. package/dist/cjs/packages/progress/style-jmapp/progress.scss +5 -21
  7. package/dist/cjs/packages/progress/style-jmapp/style.css +4 -18
  8. package/dist/cjs/packages/progress/style-jrkf/progress.scss +5 -21
  9. package/dist/cjs/packages/progress/style-jrkf/style.css +4 -18
  10. package/dist/cjs/packages/range/range.js +5 -11
  11. package/dist/cjs/packages/range/style/range.scss +6 -2
  12. package/dist/cjs/packages/range/style/style.css +3 -1
  13. package/dist/cjs/packages/range/style-jmapp/range.scss +6 -2
  14. package/dist/cjs/packages/range/style-jmapp/style.css +3 -1
  15. package/dist/cjs/packages/range/style-jrkf/range.scss +6 -2
  16. package/dist/cjs/packages/range/style-jrkf/style.css +3 -1
  17. package/dist/cjs/packages/range/utils.d.ts +3 -0
  18. package/dist/cjs/packages/range/utils.js +24 -0
  19. package/dist/cjs/packages/searchbar/searchbar.js +162 -87
  20. package/dist/cjs/packages/searchbar/style/searchbar.scss +99 -25
  21. package/dist/cjs/packages/searchbar/style/style.css +102 -38
  22. package/dist/cjs/packages/searchbar/style-jmapp/searchbar.scss +99 -25
  23. package/dist/cjs/packages/searchbar/style-jmapp/style.css +85 -21
  24. package/dist/cjs/packages/searchbar/style-jrkf/searchbar.scss +99 -25
  25. package/dist/cjs/packages/searchbar/style-jrkf/style.css +85 -21
  26. package/dist/cjs/packages/step/step.js +74 -33
  27. package/dist/cjs/packages/step/style/step.scss +104 -195
  28. package/dist/cjs/packages/step/style/style.css +85 -159
  29. package/dist/cjs/packages/step/style-jmapp/step.scss +104 -195
  30. package/dist/cjs/packages/step/style-jmapp/style.css +88 -162
  31. package/dist/cjs/packages/step/style-jrkf/step.scss +104 -195
  32. package/dist/cjs/packages/step/style-jrkf/style.css +88 -162
  33. package/dist/cjs/packages/steps/steps.js +23 -8
  34. package/dist/cjs/packages/steps/style/steps.scss +328 -4
  35. package/dist/cjs/packages/steps/style/style.css +219 -2
  36. package/dist/cjs/packages/steps/style-jmapp/steps.scss +328 -4
  37. package/dist/cjs/packages/steps/style-jmapp/style.css +219 -2
  38. package/dist/cjs/packages/steps/style-jrkf/steps.scss +328 -4
  39. package/dist/cjs/packages/steps/style-jrkf/style.css +219 -2
  40. package/dist/cjs/packages/uploader/uploader.js +20 -9
  41. package/dist/cjs/types/spec/progress/base.d.ts +6 -0
  42. package/dist/cjs/types/spec/progress/taro.d.ts +4 -0
  43. package/dist/cjs/types/spec/searchbar/base.d.ts +3 -0
  44. package/dist/cjs/types/spec/steps/base.d.ts +11 -2
  45. package/dist/es/packages/configprovider/types.d.ts +1 -1
  46. package/dist/es/packages/progress/progress.js +38 -17
  47. package/dist/es/packages/progress/style/progress.scss +5 -21
  48. package/dist/es/packages/progress/style/style.css +5 -19
  49. package/dist/es/packages/progress/style-jmapp/progress.scss +5 -21
  50. package/dist/es/packages/progress/style-jmapp/style.css +4 -18
  51. package/dist/es/packages/progress/style-jrkf/progress.scss +5 -21
  52. package/dist/es/packages/progress/style-jrkf/style.css +4 -18
  53. package/dist/es/packages/range/range.js +5 -11
  54. package/dist/es/packages/range/style/range.scss +6 -2
  55. package/dist/es/packages/range/style/style.css +3 -1
  56. package/dist/es/packages/range/style-jmapp/range.scss +6 -2
  57. package/dist/es/packages/range/style-jmapp/style.css +3 -1
  58. package/dist/es/packages/range/style-jrkf/range.scss +6 -2
  59. package/dist/es/packages/range/style-jrkf/style.css +3 -1
  60. package/dist/es/packages/range/utils.d.ts +3 -0
  61. package/dist/es/packages/range/utils.js +6 -0
  62. package/dist/es/packages/searchbar/searchbar.js +163 -89
  63. package/dist/es/packages/searchbar/style/searchbar.scss +99 -25
  64. package/dist/es/packages/searchbar/style/style.css +102 -38
  65. package/dist/es/packages/searchbar/style-jmapp/searchbar.scss +99 -25
  66. package/dist/es/packages/searchbar/style-jmapp/style.css +85 -21
  67. package/dist/es/packages/searchbar/style-jrkf/searchbar.scss +99 -25
  68. package/dist/es/packages/searchbar/style-jrkf/style.css +85 -21
  69. package/dist/es/packages/step/step.js +75 -34
  70. package/dist/es/packages/step/style/step.scss +104 -195
  71. package/dist/es/packages/step/style/style.css +85 -159
  72. package/dist/es/packages/step/style-jmapp/step.scss +104 -195
  73. package/dist/es/packages/step/style-jmapp/style.css +88 -162
  74. package/dist/es/packages/step/style-jrkf/step.scss +104 -195
  75. package/dist/es/packages/step/style-jrkf/style.css +88 -162
  76. package/dist/es/packages/steps/steps.js +23 -8
  77. package/dist/es/packages/steps/style/steps.scss +328 -4
  78. package/dist/es/packages/steps/style/style.css +219 -2
  79. package/dist/es/packages/steps/style-jmapp/steps.scss +328 -4
  80. package/dist/es/packages/steps/style-jmapp/style.css +219 -2
  81. package/dist/es/packages/steps/style-jrkf/steps.scss +328 -4
  82. package/dist/es/packages/steps/style-jrkf/style.css +219 -2
  83. package/dist/es/packages/uploader/uploader.js +20 -9
  84. package/dist/es/types/spec/progress/base.d.ts +24 -0
  85. package/dist/es/types/spec/progress/taro.d.ts +4 -0
  86. package/dist/es/types/spec/searchbar/base.d.ts +10 -1
  87. package/dist/es/types/spec/steps/base.d.ts +26 -5
  88. package/dist/nutui.react.umd.js +317 -167
  89. package/dist/style-jmapp.css +1 -1
  90. package/dist/style-jmapp.scss +39 -39
  91. package/dist/style-jrkf.css +1 -1
  92. package/dist/style-jrkf.scss +42 -42
  93. package/dist/style.css +1 -1
  94. package/dist/style.scss +41 -41
  95. package/dist/styles/variables-jmapp.scss +133 -79
  96. package/dist/styles/variables-jrkf.scss +134 -80
  97. package/dist/styles/variables.scss +148 -89
  98. package/package.json +1 -1
@@ -3,195 +3,121 @@
3
3
  /* #ifndef harmony */
4
4
  /* #endif */
5
5
  .nut-step {
6
- flex-grow: 0;
7
- flex-shrink: 0;
8
- flex: 1;
9
- text-align: center;
10
- font-size: 0;
11
- }
12
- .nut-step-head {
13
6
  position: relative;
14
7
  display: flex;
15
- justify-content: center;
16
- margin-bottom: var(--nutui-steps-base-icon-margin-bottom, 12px);
17
8
  }
18
- .nut-step-line {
19
- position: absolute;
20
- top: calc(var(--nutui-steps-base-icon-height, 25px) / 2);
21
- left: calc(50% + (100% - var(--nutui-steps-base-line-width, 70%)) / 2);
22
- height: var(--nutui-steps-base-line-height, 1px);
23
- width: var(--nutui-steps-base-line-width, 70%);
24
- background: var(--nutui-steps-base-line-background, var(--nutui-color-border));
9
+ .nut-step-last .nut-step-line {
10
+ display: none;
25
11
  }
26
- .nut-step-icon {
12
+ .nut-step-head {
27
13
  position: relative;
28
14
  display: flex;
29
15
  align-items: center;
30
- justify-content: center;
31
- width: var(--nutui-steps-base-icon-width, 25px);
32
- height: var(--nutui-steps-base-icon-height, 25px);
33
- line-height: var(--nutui-steps-base-icon-line-height, 25px);
34
- font-size: var(--nutui-steps-base-icon-font-size, var(--nutui-font-text-small));
35
- background-color: var(--nutui-steps-wait-icon-bg-color, var(--nutui-color-default));
36
- border-color: var(--nutui-steps-wait-icon-bg-color, var(--nutui-color-default));
37
- color: var(--nutui-steps-wait-icon-color, var(--nutui-color-text-help));
16
+ height: var(--nutui-steps-base-head-height, 14px);
17
+ position: relative;
38
18
  z-index: 1;
39
19
  }
40
- .nut-step-icon .nut-icon {
41
- width: 100%;
42
- height: 100%;
20
+ .nut-step-head-text {
21
+ height: var(--nutui-steps-base-head-text-size, 12px);
22
+ width: var(--nutui-steps-base-head-text-size, 12px);
23
+ background-color: var(--nutui-steps-base-head-background-color, var(--nutui-color-surface-1));
24
+ color: var(--nutui-steps-base-head-color, var(--nutui-color-text));
25
+ font-size: var(--nutui-steps-base-icon-size, var(--nutui-font-text-mini));
43
26
  }
44
- .nut-step-icon.is-text {
45
- border-radius: 50%;
46
- border-width: 1px;
47
- border-style: solid;
27
+ .nut-step-head-icon {
28
+ height: var(--nutui-steps-base-head-icon-size, 16px);
29
+ width: var(--nutui-steps-base-head-icon-size, 16px);
30
+ background-color: var(--nutui-steps-base-head-background-color, var(--nutui-color-surface-1));
31
+ }
32
+ .nut-step-head-icon .nut-icon {
33
+ color: white;
34
+ }
35
+ .nut-step-head-dot {
36
+ height: var(--nutui-steps-base-head-dot-size, 6px);
37
+ width: var(--nutui-steps-base-head-dot-size, 6px);
38
+ background-color: var(--nutui-steps-base-head-dot-background-color, var(--nutui-color-text-disabled));
48
39
  }
49
- .nut-step-icon.is-icon {
40
+ .nut-step-head-dot, .nut-step-head-icon, .nut-step-head-text {
41
+ display: flex;
42
+ align-items: center;
43
+ justify-content: center;
50
44
  border-radius: 50%;
51
- border-width: 1px;
52
- border-style: solid;
45
+ box-sizing: border-box;
46
+ border: var(--nutui-steps-base-head-border, none);
47
+ }
48
+ .nut-step-line {
49
+ position: absolute;
50
+ z-index: 0;
51
+ display: flex;
52
+ align-items: center;
53
+ justify-content: center;
54
+ }
55
+ .nut-step-line-inner {
56
+ display: flex;
57
+ flex: 1;
58
+ height: var(--nutui-steps-base-line-height, 1px);
59
+ background: var(--nutui-steps-base-line-background, var(--nutui-color-border));
53
60
  }
54
61
  .nut-step-main {
55
- padding: 0 10%;
62
+ position: relative;
56
63
  display: flex;
57
64
  flex-direction: column;
58
65
  justify-content: center;
59
- align-items: center;
66
+ min-height: var(--nutui-steps-base-head-height, 14px);
67
+ }
68
+ .nut-step-line, .nut-step-title {
69
+ background-color: #ffffff;
70
+ }
71
+ .nut-step-title {
72
+ position: relative;
73
+ z-index: 1;
60
74
  }
61
75
  .nut-step-title {
62
- display: block;
63
- margin-bottom: var(--nutui-steps-base-title-margin-bottom, 0);
64
- font-size: var(--nutui-steps-base-title-font-size, var(--nutui-font-text));
76
+ height: 14px;
77
+ line-height: 14px;
78
+ font-size: var(--nutui-steps-base-title-font-size, var(--nutui-font-text-small));
65
79
  color: var(--nutui-steps-base-title-color, var(--nutui-color-title));
80
+ overflow: hidden;
81
+ white-space: nowrap;
66
82
  }
67
83
  .nut-step-description {
68
- display: block;
69
- font-size: var(--nutui-steps-base-description-font-size, var(--nutui-font-text-small));
70
- color: var(--nutui-steps-base-description-color, var(--nutui-color-text));
71
- }
72
- .nut-step:last-child .nut-step-line {
73
- display: none;
74
- }
75
- .nut-step.nut-step-process .nut-step-icon {
76
- background-color: var(--nutui-steps-process-icon-bg-color, var(--nutui-color-primary, #ff6666));
77
- border-color: var(--nutui-steps-process-icon-bg-color, var(--nutui-color-primary, #ff6666));
78
- color: var(--nutui-steps-process-icon-color, #ffffff);
79
- }
80
- .nut-step.nut-step-process .nut-step-title {
81
- color: var(--nutui-steps-process-title-color, var(--nutui-color-primary, #ff6666));
82
- font-size: var(--nutui-steps-process-title-font-size, var(--nutui-font-text));
83
- font-weight: var(--nutui-steps-process-title-font-weight, var(--nutui-font-weight-bold));
84
- }
85
- .nut-step.nut-step-process .nut-step-description {
86
- color: var(--nutui-steps-process-description-color, var(--nutui-color-text));
87
- }
88
- .nut-step.nut-step-wait .nut-step-title {
89
- color: var(--nutui-steps-wait-title-color, var(--nutui-color-text-help));
90
- }
91
- .nut-step.nut-step-wait .nut-step-description {
92
- color: var(--nutui-steps-wait-description-color, var(--nutui-color-text-help));
93
- }
94
- .nut-step.nut-step-finish .nut-step-icon {
95
- background-color: var(--nutui-steps-finish-icon-bg-color, var(--nutui-color-primary-light, #ffe5e5));
96
- border-color: var(--nutui-steps-finish-icon-border-color, transparent);
97
- color: var(--nutui-steps-finish-icon-color, var(--nutui-color-primary, #ff6666));
98
- }
99
- .nut-step.nut-step-finish .nut-step-line {
100
- background: var(--nutui-steps-finish-line-background, var(--nutui-color-primary, #ff6666));
101
- }
102
- .nut-step.nut-step-finish .nut-step-title {
103
- color: var(--nutui-steps-finish-title-color, var(--nutui-color-title));
104
- }
105
- .nut-step.nut-step-finish .nut-step-description {
106
- color: var(--nutui-steps-finish-description-color, var(--nutui-color-text));
84
+ height: 16px;
85
+ line-height: 16px;
86
+ margin-top: var(--nutui-steps-base-title-margin-bottom, 2px);
87
+ font-size: var(--nutui-steps-base-description-font-size, var(--nutui-font-text-mini));
88
+ color: var(--nutui-steps-base-description-color, var(--nutui-color-text-help));
89
+ overflow: hidden;
90
+ }
91
+ .nut-step.nut-step-process .nut-step-head-icon,
92
+ .nut-step.nut-step-process .nut-step-head-text,
93
+ .nut-step.nut-step-process .nut-step-head-dot {
94
+ background-color: var(--nutui-steps-process-head-background-color, var(--nutui-color-primary, #ff6666));
95
+ }
96
+ .nut-step.nut-step-process .nut-step-head-text {
97
+ color: var(--nutui-steps-process-color, #ffffff);
98
+ }
99
+ .nut-step.nut-step-wait .nut-step-head-icon .nut-icon {
100
+ color: var(--nutui-steps-wait-icon-color, var(--nutui-color-text-help));
107
101
  }
108
-
109
- .nut-steps-dot .nut-step-head {
110
- margin: var(--nutui-steps-dot-head-margin, 10px 0);
102
+ .nut-step.nut-step-finish .nut-step-head-icon .nut-icon {
103
+ color: var(--nutui-steps-finish-icon-color, var(--nutui-color-text-help));
111
104
  }
112
- .nut-steps-dot .nut-step-line {
113
- top: 7px;
105
+ .nut-step.nut-step-business .nut-step-head-text {
106
+ color: var(--nutui-steps-business-head-text-color, var(--nutui-color-service-pressed));
114
107
  }
115
- .nut-steps-dot .nut-step-icon {
116
- width: var(--nutui-steps-dot-icon-width, 6px);
117
- height: var(--nutui-steps-dot-icon-height, 6px);
118
- border: var(--nutui-steps-dot-icon-border, 2px solid var(--nutui-color-border-shade));
119
- border-radius: 50%;
120
- box-sizing: content-box;
108
+ .nut-step.nut-step-business .nut-step-title {
109
+ color: var(--nutui-steps-business-title-color, var(--nutui-color-service-pressed));
121
110
  }
122
- .nut-steps-dot .nut-step-wait .nut-step-icon {
123
- background-color: var(--nutui-steps-dot-wait-icon-bg-color, #ffffff);
111
+ .nut-step.nut-step-business .nut-step-description {
112
+ color: var(--nutui-steps-business-description-color, var(--nutui-color-service-pressed));
124
113
  }
125
- .nut-steps-dot .nut-step-finish .nut-step-icon {
126
- background-color: var(--nutui-steps-finish-icon-bg-color, #ffffff);
127
- border-color: var(--nutui-steps-finish-icon-color, var(--nutui-color-primary, #ff6666));
114
+ .nut-step.nut-step-business .nut-step-head-dot {
115
+ background-color: var(--nutui-steps-business-head-dot-background-color, var(--nutui-color-service-pressed));
128
116
  }
129
- .nut-steps-dot .nut-step-process .nut-step-icon {
130
- position: relative;
117
+ .nut-step.nut-step-business .nut-step-head-icon,
118
+ .nut-step.nut-step-business .nut-step-head-text {
119
+ background-color: var(--nutui-steps-business-head-background-color, var(--nutui-color-service));
131
120
  }
132
- .nut-steps-dot .nut-step-process .nut-step-icon:before {
133
- content: "";
134
- display: inline-block;
135
- position: absolute;
136
- left: 50%;
137
- top: 50%;
138
- margin-left: -7px;
139
- margin-top: -7px;
140
- width: 14px;
141
- height: 14px;
142
- background-color: var(--nutui-steps-process-icon-before-bg-color, none);
143
- border-radius: 50%;
144
- opacity: 0.23;
145
- }
146
-
147
- .nut-steps-horizontal.nut-steps-dot .nut-step-line {
148
- top: 50%;
149
- bottom: -50%;
150
- }
151
-
152
- .nut-steps-vertical .nut-step {
153
- display: flex;
154
- height: 33.34%;
155
- }
156
- .nut-steps-vertical .nut-step-line {
157
- position: absolute;
158
- display: inline-block;
159
- width: 1px;
160
- height: var(--nutui-steps-base-line-width, 70%);
161
- background: var(--nutui-steps-base-line-background, var(--nutui-color-border));
162
- top: calc(var(--nutui-steps-base-icon-height, 25px) + (100% - var(--nutui-steps-base-line-width, 70%) - var(--nutui-steps-base-icon-margin-bottom, 12px)) / 2);
163
- left: calc(50% - 1px);
164
- }
165
- .nut-steps-vertical.nut-steps-dot .nut-step-line {
166
- top: calc(var(--nutui-steps-dot-icon-height, 6px) + (100% - var(--nutui-steps-base-line-width, 70%)) / 2);
167
- }
168
- .nut-steps-vertical .nut-step-main {
169
- display: inline-block;
170
- padding-left: 6%;
171
- text-align: start;
172
- }
173
-
174
- [dir=rtl] .nut-step-line,
175
- .nut-rtl .nut-step-line {
176
- left: auto;
177
- right: calc(50% + (100% - var(--nutui-steps-base-line-width, 70%)) / 2);
178
- }
179
-
180
- [dir=rtl] .nut-steps-dot .nut-step-process .nut-step-icon:before,
181
- .nut-rtl .nut-steps-dot .nut-step-process .nut-step-icon:before {
182
- left: auto;
183
- right: 50%;
184
- margin-left: 0;
185
- margin-right: -7px;
186
- }
187
-
188
- [dir=rtl] .nut-steps-vertical .nut-step-line,
189
- .nut-rtl .nut-steps-vertical .nut-step-line {
190
- left: auto;
191
- right: calc(50% - 1px);
192
- }
193
- [dir=rtl] .nut-steps-vertical .nut-step-main,
194
- .nut-rtl .nut-steps-vertical .nut-step-main {
195
- padding-left: 0;
196
- padding-right: 6%;
121
+ .nut-step.nut-step-business .nut-step-head-icon .nut-icon {
122
+ color: var(--nutui-steps-business-head-icon-color, var(--nutui-color-service-pressed));
197
123
  }
@@ -7,18 +7,23 @@ import classNames from "classnames";
7
7
  import { DataContext } from "./context";
8
8
  import { ComponentDefaults } from "../../utils/typings";
9
9
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
10
- value: 0,
11
10
  direction: 'horizontal',
12
- dot: false
11
+ layout: 'single',
12
+ type: 'text',
13
+ status: 'default',
14
+ value: 0,
15
+ icon: null
13
16
  });
14
17
  export var Steps = function(props) {
15
18
  var propSteps = _object_spread({}, defaultProps, props);
16
- var children = propSteps.children, value = propSteps.value, direction = propSteps.direction, className = propSteps.className, dot = propSteps.dot, onStepClick = propSteps.onStepClick, restProps = _object_without_properties(propSteps, [
17
- "children",
18
- "value",
19
+ var direction = propSteps.direction, value = propSteps.value, layout = propSteps.layout, status = propSteps.status, type = propSteps.type, className = propSteps.className, children = propSteps.children, onStepClick = propSteps.onStepClick, restProps = _object_without_properties(propSteps, [
19
20
  "direction",
21
+ "value",
22
+ "layout",
23
+ "status",
24
+ "type",
20
25
  "className",
21
- "dot",
26
+ "children",
22
27
  "onStepClick"
23
28
  ]);
24
29
  var parentSteps = {
@@ -26,11 +31,21 @@ export var Steps = function(props) {
26
31
  };
27
32
  var classPrefix = "nut-steps";
28
33
  var _obj;
29
- var classes = classNames(classPrefix, (_obj = {}, _define_property(_obj, "".concat(classPrefix, "-").concat(direction), true), _define_property(_obj, "".concat(classPrefix, "-dot"), !!dot), _obj), className);
34
+ var classes = classNames(classPrefix, (_obj = {}, _define_property(_obj, "".concat(classPrefix, "-").concat(direction), true), _define_property(_obj, "".concat(classPrefix, "-").concat(direction, "-count-").concat(React.Children.count(children)), true), _define_property(_obj, "".concat(classPrefix, "-").concat(direction, "-").concat(layout), true), _define_property(_obj, "".concat(classPrefix, "-").concat(direction, "-").concat(type), true), _define_property(_obj, "".concat(classPrefix, "-").concat(direction, "-").concat(status), true), _obj), className);
30
35
  return /*#__PURE__*/ React.createElement(DataContext.Provider, {
31
36
  value: parentSteps
32
37
  }, /*#__PURE__*/ React.createElement("div", _object_spread({
33
38
  className: classes
34
- }, restProps), children));
39
+ }, restProps), React.Children.map(children, function(child, index) {
40
+ if (/*#__PURE__*/ React.isValidElement(child)) {
41
+ return /*#__PURE__*/ React.cloneElement(child, {
42
+ // @ts-ignore
43
+ className: classNames(child.props.className, {
44
+ 'nut-step-last': index === React.Children.count(children) - 1
45
+ })
46
+ });
47
+ }
48
+ return child;
49
+ })));
35
50
  };
36
51
  Steps.displayName = 'NutSteps';
@@ -1,8 +1,332 @@
1
1
  .nut-steps {
2
2
  display: flex;
3
- }
4
3
 
5
- .nut-steps-vertical {
6
- height: 100%;
7
- flex-flow: column;
4
+ // 横向滚动条
5
+ &-horizontal {
6
+ flex-flow: row;
7
+
8
+ .nut-step {
9
+ &-head {
10
+ background-color: $steps-background-color;
11
+
12
+ &-icon {
13
+ .nut-icon {
14
+ height: 10px;
15
+ width: 10px;
16
+ }
17
+
18
+ .nut-image {
19
+ width: 100%;
20
+ height: 100%;
21
+ background-color: $steps-background-color;
22
+ img {
23
+ vertical-align: top;
24
+ }
25
+ }
26
+ }
27
+ }
28
+
29
+ // 流程状态-当前
30
+ &.nut-step-process {
31
+ .nut-step-title {
32
+ color: $steps-process-title-color;
33
+ }
34
+
35
+ .nut-step-description {
36
+ color: $steps-process-description-color;
37
+ }
38
+ }
39
+
40
+ // 流程状态-等待
41
+ &.nut-step-wait {
42
+ .nut-step-title {
43
+ color: $steps-wait-title-color;
44
+ }
45
+
46
+ .nut-step-description {
47
+ color: $steps-wait-description-color;
48
+ }
49
+ }
50
+
51
+ // 流程状态-完成
52
+ &.nut-step-finish {
53
+ }
54
+ }
55
+
56
+ &-single {
57
+ .nut-step {
58
+ padding-right: $steps-horizontal-item-padding-right;
59
+
60
+ &-last {
61
+ padding-right: 0 !important;
62
+ }
63
+
64
+ &-line {
65
+ top: 0;
66
+ right: 0;
67
+ height: $steps-base-head-height;
68
+ width: $steps-horizontal-item-padding-right;
69
+ padding: $steps-horizontal-item-line-padding;
70
+ box-sizing: border-box;
71
+ }
72
+
73
+ &-title,
74
+ &-description {
75
+ padding-left: 4px;
76
+ }
77
+
78
+ &-special {
79
+ padding-right: $steps-horizontal-item-special-padding-right;
80
+
81
+ .nut-step-line {
82
+ width: 100%;
83
+ }
84
+
85
+ .nut-step-title {
86
+ padding-right: 8px;
87
+ width: fit-content;
88
+ }
89
+ }
90
+ }
91
+
92
+ &.nut-steps-horizontal-count-3 {
93
+ .nut-step-special {
94
+ padding-right: $steps-horizontal-item-special-3-padding-right;
95
+ }
96
+ }
97
+ }
98
+
99
+ &-double {
100
+ width: 100%;
101
+ justify-content: space-between;
102
+
103
+ .nut-step {
104
+ flex-direction: column;
105
+ align-items: center;
106
+ flex: 1;
107
+
108
+ &-line {
109
+ top: 0;
110
+ right: -50%;
111
+ height: $steps-base-head-height;
112
+ width: 100%;
113
+
114
+ &-inner {
115
+ display: inline-flex;
116
+ height: $steps-base-line-height;
117
+ width: 100%;
118
+ background: $steps-base-line-background;
119
+ }
120
+ }
121
+
122
+ &-head {
123
+ justify-content: center;
124
+ margin-bottom: 6px;
125
+
126
+ &-dot-wrap,
127
+ &-icon-wrap,
128
+ &-text-wrap {
129
+ background-color: $steps-background-color;
130
+ padding: $steps-horizontal-item-line-padding;
131
+ }
132
+ }
133
+
134
+ &-head-icon {
135
+ height: $steps-double-head-icon-size;
136
+ width: $steps-double-head-icon-size;
137
+
138
+ .nut-icon {
139
+ height: 12px;
140
+ width: 12px;
141
+ }
142
+ }
143
+
144
+ &-main {
145
+ align-items: center;
146
+ margin-left: 0;
147
+ margin-top: 2px;
148
+ }
149
+ }
150
+
151
+ &.nut-steps-horizontal-icon {
152
+ .nut-step {
153
+ &-head,
154
+ &-line {
155
+ height: $steps-double-head-icon-size;
156
+ }
157
+ }
158
+ }
159
+
160
+ &.nut-steps-horizontal-dot {
161
+ .nut-step {
162
+ &-head,
163
+ &-line {
164
+ height: $steps-base-head-dot-size;
165
+ }
166
+ }
167
+ }
168
+
169
+ &.nut-steps-horizontal-text {
170
+ .nut-step {
171
+ &-head,
172
+ &-line {
173
+ height: $steps-base-head-text-size;
174
+ }
175
+ }
176
+ }
177
+ }
178
+ }
179
+
180
+ // 纵向滚动条
181
+ &-vertical {
182
+ /* #ifdef harmony*/
183
+ flex: 1;
184
+ min-width: 0;
185
+ /* #endif */
186
+ flex-direction: column;
187
+
188
+ .nut-step {
189
+ padding-bottom: $steps-vertical-item-padding-bottom;
190
+
191
+ &-last {
192
+ padding-bottom: 0 !important;
193
+ }
194
+
195
+ &-line {
196
+ height: calc(100% - 4px);
197
+ width: 1px;
198
+ bottom: 0;
199
+
200
+ &-inner {
201
+ height: 100%;
202
+ }
203
+ }
204
+
205
+ &-head {
206
+ align-items: center;
207
+ justify-content: center;
208
+ height: 18px;
209
+
210
+ &-icon {
211
+ width: $steps-vertical-head-icon-size;
212
+ height: $steps-vertical-head-icon-size;
213
+
214
+ .nut-icon {
215
+ height: 12px;
216
+ width: 12px;
217
+ }
218
+ }
219
+ }
220
+
221
+ &-main {
222
+ flex: 1;
223
+ min-width: 0;
224
+ height: auto;
225
+ margin-left: 8px;
226
+ }
227
+
228
+ &-title {
229
+ display: flex;
230
+ align-items: center;
231
+ height: $steps-vertical-line-height;
232
+ font-size: $steps-vertical-title-font-size;
233
+ overflow: auto;
234
+ font-weight: 500;
235
+ margin-bottom: $steps-vertical-title-margin-bottom;
236
+ }
237
+
238
+ &-description {
239
+ margin: $steps-vertical-description-margin;
240
+ height: auto;
241
+ line-height: $steps-vertical-line-height;
242
+ color: $color-title;
243
+ font-size: $steps-vertical-description-font-size;
244
+ box-sizing: border-box;
245
+ }
246
+
247
+ &-head-dot-wrap,
248
+ &-head-icon-wrap,
249
+ &-head-text-wrap {
250
+ display: flex;
251
+ align-items: center;
252
+ justify-content: center;
253
+ width: 100%;
254
+ background-color: white;
255
+ position: relative;
256
+ z-index: 1;
257
+ }
258
+
259
+ &-head-dot-wrap {
260
+ height: calc($steps-base-head-dot-size + 8px);
261
+ }
262
+
263
+ &-head-icon-wrap {
264
+ height: calc($steps-vertical-head-icon-size + 8px);
265
+ }
266
+
267
+ &-head-text-wrap {
268
+ height: calc($steps-base-head-text-size + 8px);
269
+ }
270
+ }
271
+
272
+ &-icon {
273
+ .nut-step {
274
+ &-head {
275
+ width: calc($steps-vertical-head-icon-size + 1px);
276
+ min-width: calc($steps-vertical-head-icon-size + 1px);
277
+ }
278
+
279
+ &-line {
280
+ left: calc($steps-vertical-head-icon-size / 2);
281
+ }
282
+ }
283
+ }
284
+
285
+ &-dot {
286
+ .nut-step {
287
+ &-head {
288
+ width: calc($steps-base-head-dot-size + 1px);
289
+ }
290
+
291
+ &-line {
292
+ left: calc($steps-base-head-dot-size / 2);
293
+ }
294
+ }
295
+ }
296
+
297
+ &-text {
298
+ .nut-step {
299
+ &-head {
300
+ width: calc($steps-base-head-text-size + 1px);
301
+ min-width: calc($steps-base-head-text-size + 1px);
302
+ }
303
+
304
+ &-line {
305
+ left: calc($steps-base-head-text-size / 2);
306
+ }
307
+ }
308
+ }
309
+ }
310
+
311
+ &-horizontal-enhanced,
312
+ &-vertical-enhanced {
313
+ .nut-step-finish {
314
+ .nut-step-head-icon,
315
+ .nut-step-head-text {
316
+ background-color: $steps-enhanced-finish-head-background-color;
317
+
318
+ .nut-icon {
319
+ color: $steps-enhanced-finish-head-icon-color;
320
+ }
321
+ }
322
+
323
+ .nut-step-head-text {
324
+ color: $steps-enhanced-finish-head-text-color;
325
+ }
326
+
327
+ .nut-step-head-dot {
328
+ background-color: $steps-enhanced-finish-head-dot-background-color;
329
+ }
330
+ }
331
+ }
8
332
  }