@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
@@ -13,26 +13,101 @@
13
13
  box-sizing: border-box;
14
14
  justify-content: center;
15
15
  }
16
+ .nut-searchbar .nut-icon {
17
+ width: var(--nutui-searchbar-icon-size, 20px);
18
+ height: var(--nutui-searchbar-icon-size, 20px);
19
+ font-size: var(--nutui-searchbar-icon-size, 20px);
20
+ }
16
21
  .nut-searchbar-content {
22
+ position: relative;
17
23
  flex: 1;
18
24
  display: flex;
19
25
  align-items: center;
20
26
  justify-content: center;
21
- padding: var(--nutui-searchbar-content-padding, 0 12px);
27
+ padding: 0 var(--nutui-searchbar-gap, 16px);
22
28
  height: var(--nutui-searchbar-input-height, 36px);
23
29
  background: var(--nutui-searchbar-content-background, var(--nutui-color-default-light));
24
30
  border-radius: var(--nutui-searchbar-content-border-radius, var(--nutui-radius-xs));
31
+ border: 1px solid var(--nutui-color-primary, #ff6666);
25
32
  }
26
33
  .nut-searchbar-icon {
27
34
  display: flex;
28
35
  justify-content: center;
29
36
  align-items: center;
37
+ color: var(--nutui-color-primary, #ff6666);
38
+ }
39
+ .nut-searchbar-leftin {
40
+ margin-right: var(--nutui-searchbar-inner-gap, 8px);
41
+ }
42
+ .nut-searchbar-rightin {
43
+ font-size: 15px;
44
+ font-weight: 500;
45
+ color: var(--nutui-color-primary, #ff6666);
30
46
  }
31
- .nut-searchbar-clear, .nut-searchbar-rightin {
32
- width: 16px;
33
- height: 16px;
47
+ .nut-searchbar-rightin.nut-searchbar-icon {
34
48
  color: var(--nutui-black-5);
35
49
  }
50
+ .nut-searchbar-input-box, .nut-searchbar-input {
51
+ display: flex;
52
+ align-items: center;
53
+ flex: 1;
54
+ }
55
+ .nut-searchbar-input {
56
+ border: 0;
57
+ outline: 0;
58
+ box-sizing: border-box;
59
+ width: 100%;
60
+ padding: 0;
61
+ margin: 0;
62
+ font-size: var(--nutui-searchbar-font-size, var(--nutui-font-text));
63
+ color: var(--nutui-searchbar-input-text-color, var(--nutui-color-text));
64
+ caret-color: var(--nutui-searchbar-input-curror-color, var(--nutui-color-title));
65
+ background: transparent;
66
+ text-align: var(--nutui-searchbar-input-text-align, left);
67
+ }
68
+ .nut-searchbar-clear.nut-searchbar-icon {
69
+ position: relative;
70
+ }
71
+ .nut-searchbar-clear.nut-searchbar-icon .nut-icon {
72
+ width: 12px;
73
+ height: 12px;
74
+ color: var(--nutui-black-5);
75
+ margin-right: var(--nutui-searchbar-inner-gap, 8px);
76
+ }
77
+ .nut-searchbar-clear.nut-searchbar-icon::after {
78
+ content: "";
79
+ position: absolute;
80
+ width: 100%;
81
+ height: 200%;
82
+ left: -20%;
83
+ }
84
+ .nut-searchbar-values {
85
+ position: absolute;
86
+ display: flex;
87
+ flex-direction: row;
88
+ z-index: 2;
89
+ background-color: #fff;
90
+ top: 9px;
91
+ left: 6px;
92
+ font-size: 12px;
93
+ line-height: 12px;
94
+ }
95
+ .nut-searchbar-values .nut-searchbar-value {
96
+ display: flex;
97
+ flex-direction: row;
98
+ align-items: center;
99
+ padding: 4px 8px;
100
+ background-color: #f7f8fc;
101
+ border-radius: 4px;
102
+ margin-right: 2px;
103
+ }
104
+ .nut-searchbar-values .nut-icon {
105
+ width: 6px;
106
+ height: 6px;
107
+ font-size: 6px;
108
+ color: #c2c4cc;
109
+ margin-left: 4px;
110
+ }
36
111
  .nut-searchbar-left, .nut-searchbar-right {
37
112
  display: inline-flex;
38
113
  align-items: center;
@@ -75,29 +150,18 @@
75
150
  .nut-searchbar-right > text:first-child, .nut-searchbar-right > view:first-child {
76
151
  margin-left: 0;
77
152
  }
78
- .nut-searchbar-input-box, .nut-searchbar-input {
79
- display: flex;
80
- align-items: center;
81
- flex: 1;
82
- }
83
- .nut-searchbar-input {
84
- border: 0;
85
- outline: 0;
86
- box-sizing: border-box;
87
- width: 100%;
88
- padding: var(--nutui-searchbar-input-padding, 4px 8px);
89
- font-size: var(--nutui-searchbar-font-size, var(--nutui-font-text));
90
- color: var(--nutui-searchbar-input-text-color, var(--nutui-color-text));
91
- caret-color: var(--nutui-searchbar-input-curror-color, var(--nutui-color-title));
92
- background: transparent;
93
- text-align: var(--nutui-searchbar-input-text-align, left);
94
- }
95
153
  .nut-searchbar-round {
96
154
  border-radius: var(--nutui-searchbar-content-round-border-radius, 18px);
97
155
  }
98
156
  .nut-searchbar-disabled {
99
157
  cursor: not-allowed;
100
158
  }
159
+ .nut-searchbar-focus {
160
+ padding: 5px var(--nutui-searchbar-gap, 16px);
161
+ }
162
+ .nut-searchbar-focus .nut-searchbar-content {
163
+ border: 0.5px solid #ff5c67;
164
+ }
101
165
 
102
166
  [dir=rtl] .nut-searchbar-left,
103
167
  .nut-rtl .nut-searchbar-left {
@@ -25,7 +25,8 @@ var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typing
25
25
  icon: null
26
26
  });
27
27
  var Step = function Step(props) {
28
- var _ref = (0, _object_spread._)({}, defaultProps, props), children = _ref.children, title = _ref.title, description = _ref.description, value = _ref.value, icon = _ref.icon, className = _ref.className, restProps = (0, _object_without_properties._)(_ref, [
28
+ var _ref = (0, _object_spread._)({}, defaultProps, props), type = _ref.type, children = _ref.children, title = _ref.title, description = _ref.description, value = _ref.value, icon = _ref.icon, className = _ref.className, restProps = (0, _object_without_properties._)(_ref, [
29
+ "type",
29
30
  "children",
30
31
  "title",
31
32
  "description",
@@ -34,45 +35,85 @@ var Step = function Step(props) {
34
35
  "className"
35
36
  ]);
36
37
  var parent = (0, _react.useContext)(_context.DataContext);
37
- var dot = parent.propSteps.dot;
38
- var getCurrentStatus = function getCurrentStatus() {
39
- var index = value;
40
- if (index < +parent.propSteps.value) return 'finish';
41
- return index === +parent.propSteps.value ? 'process' : 'wait';
42
- };
43
- var handleClickStep = function handleClickStep() {
44
- var _parent_propSteps, _parent_propSteps1;
45
- ((_parent_propSteps = parent.propSteps) === null || _parent_propSteps === void 0 ? void 0 : _parent_propSteps.onStepClick) && ((_parent_propSteps1 = parent.propSteps) === null || _parent_propSteps1 === void 0 ? void 0 : _parent_propSteps1.onStepClick(value));
46
- };
47
- var classPrefix = "nut-step";
48
- var classes = (0, _classnames.default)(classPrefix, (0, _define_property._)({}, "".concat(classPrefix, "-").concat(getCurrentStatus()), true), className);
49
- var renderIconClass = function renderIconClass() {
50
- if (icon) {
51
- return "".concat(classPrefix, "-icon is-icon");
38
+ var _parent_propSteps = parent.propSteps, parentType = _parent_propSteps.type, parentValue = _parent_propSteps.value, status = _parent_propSteps.status, parentIcon = _parent_propSteps.icon, onStepClick = _parent_propSteps.onStepClick;
39
+ var currentStatus = (0, _react.useMemo)(function() {
40
+ if ([
41
+ 'default',
42
+ 'business'
43
+ ].includes(status)) {
44
+ return status;
52
45
  }
53
- if (!dot && !icon) {
54
- return "".concat(classPrefix, "-icon is-text");
46
+ if (value < +parentValue) return 'finish';
47
+ return value === +parentValue ? 'process' : 'wait';
48
+ }, [
49
+ value,
50
+ parentValue
51
+ ]);
52
+ var handleClickStep = (0, _react.useCallback)(function() {
53
+ onStepClick === null || onStepClick === void 0 ? void 0 : onStepClick(value);
54
+ }, [
55
+ onStepClick,
56
+ value
57
+ ]);
58
+ var classPrefix = "nut-step";
59
+ // className计算
60
+ var classes = (0, _react.useMemo)(function() {
61
+ var _obj;
62
+ return (0, _classnames.default)(classPrefix, (_obj = {}, (0, _define_property._)(_obj, "".concat(classPrefix, "-").concat(currentStatus), true), (0, _define_property._)(_obj, "".concat(classPrefix, "-").concat(type || parentType), true), (0, _define_property._)(_obj, "".concat(classPrefix, "-special"), description), _obj), className);
63
+ }, [
64
+ currentStatus,
65
+ type,
66
+ className
67
+ ]);
68
+ // 头部渲染
69
+ var renderHeadType = (0, _react.useMemo)(function() {
70
+ switch(type || parentType){
71
+ case 'text':
72
+ return /*#__PURE__*/ _react.default.createElement("span", {
73
+ className: "".concat(classPrefix, "-head-text")
74
+ }, value);
75
+ case 'dot':
76
+ return /*#__PURE__*/ _react.default.createElement("span", {
77
+ className: "".concat(classPrefix, "-head-dot")
78
+ });
79
+ case 'icon':
80
+ return /*#__PURE__*/ _react.default.createElement("span", {
81
+ className: "".concat(classPrefix, "-head-icon")
82
+ }, icon || parentIcon);
83
+ default:
84
+ return null;
55
85
  }
56
- return "".concat(classPrefix, "-icon");
57
- };
86
+ }, [
87
+ type,
88
+ value,
89
+ icon
90
+ ]);
91
+ // 内容渲染
92
+ var renderContent = (0, _react.useMemo)(function() {
93
+ if (!title && !description) return null;
94
+ return /*#__PURE__*/ _react.default.createElement("div", {
95
+ className: "".concat(classPrefix, "-main")
96
+ }, title && /*#__PURE__*/ _react.default.createElement("span", {
97
+ className: "".concat(classPrefix, "-title")
98
+ }, title), description && /*#__PURE__*/ _react.default.createElement("span", {
99
+ className: "".concat(classPrefix, "-description")
100
+ }, description));
101
+ }, [
102
+ title,
103
+ description
104
+ ]);
58
105
  return /*#__PURE__*/ _react.default.createElement("div", (0, _object_spread_props._)((0, _object_spread._)({
59
106
  className: classes
60
107
  }, restProps), {
61
108
  onClick: handleClickStep
62
109
  }), /*#__PURE__*/ _react.default.createElement("div", {
63
- className: "nut-step-head"
110
+ className: "".concat(classPrefix, "-head")
64
111
  }, /*#__PURE__*/ _react.default.createElement("div", {
65
- className: "nut-step-line"
66
- }), /*#__PURE__*/ _react.default.createElement("div", {
67
- className: renderIconClass()
68
- }, icon || !dot && /*#__PURE__*/ _react.default.createElement("span", {
69
- className: "nut-step-inner"
70
- }, value))), (title || description) && /*#__PURE__*/ _react.default.createElement("div", {
71
- className: "nut-step-main"
72
- }, /*#__PURE__*/ _react.default.createElement("span", {
73
- className: "nut-step-title"
74
- }, title), description && /*#__PURE__*/ _react.default.createElement("span", {
75
- className: "nut-step-description"
76
- }, description)));
112
+ className: "".concat(classPrefix, "-head-").concat(type || parentType, "-wrap")
113
+ }, renderHeadType)), /*#__PURE__*/ _react.default.createElement("div", {
114
+ className: "".concat(classPrefix, "-line")
115
+ }, /*#__PURE__*/ _react.default.createElement("div", {
116
+ className: "".concat(classPrefix, "-line-inner")
117
+ })), renderContent);
77
118
  };
78
119
  Step.displayName = 'NutStep';
@@ -1,257 +1,166 @@
1
1
  .nut-step {
2
- flex-grow: 0;
3
- flex-shrink: 0;
4
- flex: 1;
5
- text-align: center;
6
- font-size: 0;
2
+ position: relative;
3
+ display: flex;
7
4
 
8
- &-head {
9
- position: relative;
10
- display: flex;
11
- justify-content: center;
12
- margin-bottom: $steps-base-icon-margin-bottom;
13
- }
14
-
15
- // 计算方法:left = calc(50% + (100% - $steps-base-line-width) / 2)
16
- // 如 width=70%时,left=65%; width=100%,left=50%;
17
- &-line {
18
- position: absolute;
19
- top: calc($steps-base-icon-height / 2);
20
- left: calc(50% + (100% - $steps-base-line-width) / 2);
21
- height: $steps-base-line-height;
22
- width: $steps-base-line-width;
23
- background: $steps-base-line-background;
5
+ &-last {
6
+ .nut-step-line {
7
+ display: none;
8
+ }
24
9
  }
25
10
 
26
- &-icon {
11
+ &-head {
27
12
  position: relative;
28
13
  display: flex;
29
14
  align-items: center;
30
- justify-content: center;
31
- width: $steps-base-icon-width;
32
- height: $steps-base-icon-height;
33
- line-height: $steps-base-icon-line-height;
34
- font-size: $steps-base-icon-font-size;
35
- background-color: $steps-wait-icon-bg-color;
36
- border-color: $steps-wait-icon-bg-color;
37
- color: $steps-wait-icon-color;
15
+ height: $steps-base-head-height;
16
+ position: relative;
38
17
  z-index: 1;
39
18
 
40
- .nut-icon {
41
- width: 100%;
42
- height: 100%;
19
+ &-text {
20
+ height: $steps-base-head-text-size;
21
+ width: $steps-base-head-text-size;
22
+ background-color: $steps-base-head-background-color;
23
+ color: $steps-base-head-color;
24
+ font-size: $steps-base-head-size;
43
25
  }
44
26
 
45
- &.is-text {
46
- border-radius: 50%;
47
- border-width: 1px;
48
- border-style: solid;
27
+ &-icon {
28
+ height: $steps-base-head-icon-size;
29
+ width: $steps-base-head-icon-size;
30
+ background-color: $steps-base-head-background-color;
31
+
32
+ .nut-icon {
33
+ color: white;
34
+ }
35
+ }
36
+
37
+ &-dot {
38
+ height: $steps-base-head-dot-size;
39
+ width: $steps-base-head-dot-size;
40
+ background-color: $steps-base-head-dot-background-color;
49
41
  }
50
42
 
51
- &.is-icon {
43
+ &-dot,
44
+ &-icon,
45
+ &-text {
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: center;
52
49
  border-radius: 50%;
53
- border-width: 1px;
54
- border-style: solid;
50
+ box-sizing: border-box;
51
+ border: $steps-base-head-border;
52
+ }
53
+ }
54
+
55
+ &-line {
56
+ position: absolute;
57
+ z-index: 0;
58
+ display: flex;
59
+ align-items: center;
60
+ justify-content: center;
61
+
62
+ &-inner {
63
+ display: flex;
64
+ flex: 1;
65
+ height: $steps-base-line-height;
66
+ background: $steps-base-line-background;
55
67
  }
56
68
  }
57
69
 
58
70
  &-main {
59
- padding: 0 10%;
71
+ position: relative;
60
72
  display: flex;
61
73
  flex-direction: column;
62
74
  justify-content: center;
63
- align-items: center;
75
+ min-height: $steps-base-head-height;
76
+ }
77
+
78
+ &-line,
79
+ &-title {
80
+ background-color: #ffffff;
81
+ }
82
+
83
+ &-title {
84
+ position: relative;
85
+ z-index: 1;
64
86
  }
65
87
 
66
88
  &-title {
67
- display: block;
68
- margin-bottom: $steps-base-title-margin-bottom;
89
+ height: 14px;
90
+ line-height: 14px;
69
91
  font-size: $steps-base-title-font-size;
70
92
  color: $steps-base-title-color;
93
+ overflow: hidden;
94
+ white-space: nowrap;
71
95
  }
72
96
 
73
97
  &-description {
74
- display: block;
98
+ height: 16px;
99
+ line-height: 16px;
100
+ margin-top: $steps-base-description-margin-top;
75
101
  font-size: $steps-base-description-font-size;
76
102
  color: $steps-base-description-color;
103
+ overflow: hidden;
77
104
  }
78
105
 
79
- &:last-child {
80
- .nut-step-line {
81
- display: none;
82
- }
83
- }
84
-
106
+ // 流程状态-当前
85
107
  &.nut-step-process {
86
- .nut-step-icon {
87
- background-color: $steps-process-icon-bg-color;
88
- border-color: $steps-process-icon-bg-color;
89
- color: $steps-process-icon-color;
90
- }
91
-
92
- .nut-step-title {
93
- color: $steps-process-title-color;
94
- font-size: $steps-process-title-font-size;
95
- font-weight: $steps-process-title-font-weight;
108
+ .nut-step-head-icon,
109
+ .nut-step-head-text,
110
+ .nut-step-head-dot {
111
+ background-color: $steps-process-head-background-color;
96
112
  }
97
113
 
98
- .nut-step-description {
99
- color: $steps-process-description-color;
114
+ .nut-step-head-text {
115
+ color: $steps-process-color;
100
116
  }
101
117
  }
102
118
 
119
+ // 流程状态-等待
103
120
  &.nut-step-wait {
104
- .nut-step-title {
105
- color: $steps-wait-title-color;
106
- }
107
-
108
- .nut-step-description {
109
- color: $steps-wait-description-color;
121
+ .nut-step-head-icon {
122
+ .nut-icon {
123
+ color: $steps-wait-icon-color;
124
+ }
110
125
  }
111
126
  }
112
127
 
128
+ // 流程状态-完成
113
129
  &.nut-step-finish {
114
- .nut-step-icon {
115
- background-color: $steps-finish-icon-bg-color;
116
- border-color: $steps-finish-icon-border-color;
117
- color: $steps-finish-icon-color;
130
+ .nut-step-head-icon {
131
+ .nut-icon {
132
+ color: $steps-finish-icon-color;
133
+ }
118
134
  }
135
+ }
119
136
 
120
- .nut-step-line {
121
- background: $steps-finish-line-background;
137
+ // 强化业务属性展示
138
+ &.nut-step-business {
139
+ .nut-step-head-text {
140
+ color: $steps-business-head-text-color;
122
141
  }
123
142
 
124
143
  .nut-step-title {
125
- color: $steps-finish-title-color;
144
+ color: $steps-business-title-color;
126
145
  }
127
146
 
128
147
  .nut-step-description {
129
- color: $steps-finish-description-color;
148
+ color: $steps-business-description-color;
130
149
  }
131
- }
132
- }
133
-
134
- .nut-steps-dot {
135
- .nut-step-head {
136
- margin: $steps-dot-head-margin;
137
- }
138
-
139
- .nut-step-line {
140
- top: 7px;
141
- }
142
-
143
- .nut-step-icon {
144
- width: $steps-dot-icon-width;
145
- height: $steps-dot-icon-height;
146
- border: $steps-dot-icon-border;
147
- border-radius: 50%;
148
- box-sizing: content-box;
149
- }
150
150
 
151
- .nut-step-wait {
152
- .nut-step-icon {
153
- background-color: $steps-dot-wait-icon-bg-color;
151
+ .nut-step-head-dot {
152
+ background-color: $steps-business-head-dot-background-color;
154
153
  }
155
- }
156
154
 
157
- .nut-step-finish {
158
- .nut-step-icon {
159
- background-color: $steps-dot-finish-icon-bg-color;
160
- border-color: $steps-dot-finish-icon-border-color;
155
+ .nut-step-head-icon,
156
+ .nut-step-head-text {
157
+ background-color: $steps-business-head-background-color;
161
158
  }
162
- }
163
-
164
- .nut-step-process {
165
- .nut-step-icon {
166
- position: relative;
167
159
 
168
- &:before {
169
- content: '';
170
- display: inline-block;
171
- position: absolute;
172
- left: 50%;
173
- top: 50%;
174
- margin-left: -7px;
175
- margin-top: -7px;
176
- width: 14px;
177
- height: 14px;
178
- background-color: $steps-process-icon-before-bg-color;
179
- border-radius: 50%;
180
- opacity: 0.23;
160
+ .nut-step-head-icon {
161
+ .nut-icon {
162
+ color: $steps-business-head-icon-color;
181
163
  }
182
164
  }
183
165
  }
184
166
  }
185
-
186
- .nut-steps-horizontal {
187
- &.nut-steps-dot {
188
- .nut-step-line {
189
- top: 50%;
190
- bottom: -50%;
191
- }
192
- }
193
- }
194
-
195
- .nut-steps-vertical {
196
- .nut-step {
197
- display: flex;
198
- height: 33.34%;
199
- }
200
-
201
- .nut-step-line {
202
- position: absolute;
203
- display: inline-block;
204
- width: 1px;
205
- height: $steps-base-line-width;
206
- background: $steps-base-line-background;
207
- top: calc(
208
- $steps-base-icon-height +
209
- (100% - $steps-base-line-width - $steps-base-icon-margin-bottom) / 2
210
- );
211
- left: calc(50% - 1px);
212
- }
213
-
214
- &.nut-steps-dot {
215
- .nut-step-line {
216
- top: calc($steps-dot-icon-height + (100% - $steps-base-line-width) / 2);
217
- }
218
- }
219
-
220
- .nut-step-main {
221
- display: inline-block;
222
- padding-left: 6%;
223
- text-align: start;
224
- }
225
- }
226
- [dir='rtl'] .nut-step,
227
- .nut-rtl .nut-step {
228
- &-line {
229
- left: auto;
230
- right: calc(50% + (100% - $steps-base-line-width) / 2);
231
- }
232
- }
233
- [dir='rtl'] .nut-steps-dot,
234
- .nut-rtl .nut-steps-dot {
235
- .nut-step-process {
236
- .nut-step-icon {
237
- &:before {
238
- left: auto;
239
- right: 50%;
240
- margin-left: 0;
241
- margin-right: -7px;
242
- }
243
- }
244
- }
245
- }
246
- [dir='rtl'] .nut-steps-vertical,
247
- .nut-rtl .nut-steps-vertical {
248
- .nut-step-line {
249
- left: auto;
250
- right: calc(50% - 1px);
251
- }
252
-
253
- .nut-step-main {
254
- padding-left: 0;
255
- padding-right: 6%;
256
- }
257
- }