@douyinfe/semi-foundation 2.30.0-alpha.0 → 2.30.0

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 (224) hide show
  1. package/datePicker/monthsGridFoundation.ts +9 -3
  2. package/lib/cjs/anchor/constants.js +1 -1
  3. package/lib/cjs/anchor/foundation.js +3 -3
  4. package/lib/cjs/autoComplete/constants.js +3 -3
  5. package/lib/cjs/avatar/constants.js +1 -1
  6. package/lib/cjs/backtop/constants.js +1 -1
  7. package/lib/cjs/badge/constants.js +1 -1
  8. package/lib/cjs/banner/constants.js +1 -1
  9. package/lib/cjs/breadcrumb/constants.js +1 -1
  10. package/lib/cjs/button/constants.js +1 -1
  11. package/lib/cjs/calendar/constants.js +1 -1
  12. package/lib/cjs/card/constants.js +1 -1
  13. package/lib/cjs/carousel/constants.js +9 -9
  14. package/lib/cjs/cascader/constants.js +2 -2
  15. package/lib/cjs/cascader/foundation.js +1 -1
  16. package/lib/cjs/cascader/util.js +2 -2
  17. package/lib/cjs/checkbox/constants.js +13 -13
  18. package/lib/cjs/collapse/constants.js +1 -1
  19. package/lib/cjs/collapsible/constants.js +1 -1
  20. package/lib/cjs/datePicker/_utils/getInsetInputFormatToken.js +1 -1
  21. package/lib/cjs/datePicker/_utils/getMonthTable.js +4 -4
  22. package/lib/cjs/datePicker/_utils/getMonthsInYear.js +1 -1
  23. package/lib/cjs/datePicker/constants.js +27 -27
  24. package/lib/cjs/datePicker/foundation.js +3 -3
  25. package/lib/cjs/datePicker/inputFoundation.js +2 -2
  26. package/lib/cjs/datePicker/monthsGridFoundation.js +15 -4
  27. package/lib/cjs/descriptions/constants.js +1 -1
  28. package/lib/cjs/divider/constants.js +1 -1
  29. package/lib/cjs/dropdown/constants.js +3 -3
  30. package/lib/cjs/dropdown/menuFoundation.js +1 -1
  31. package/lib/cjs/empty/constants.js +1 -1
  32. package/lib/cjs/form/constants.js +1 -1
  33. package/lib/cjs/form/foundation.js +1 -1
  34. package/lib/cjs/form/utils.js +1 -1
  35. package/lib/cjs/grid/constants.js +1 -1
  36. package/lib/cjs/highlight/constants.js +1 -1
  37. package/lib/cjs/icons/constants.js +1 -1
  38. package/lib/cjs/image/constants.js +1 -1
  39. package/lib/cjs/input/constants.js +1 -1
  40. package/lib/cjs/input/textareaFoundation.js +1 -1
  41. package/lib/cjs/layout/constants.js +1 -1
  42. package/lib/cjs/list/constants.js +1 -1
  43. package/lib/cjs/modal/constants.js +1 -1
  44. package/lib/cjs/navigation/constants.js +1 -1
  45. package/lib/cjs/notification/constants.js +3 -3
  46. package/lib/cjs/pagination/constants.js +1 -1
  47. package/lib/cjs/popconfirm/constants.js +2 -2
  48. package/lib/cjs/popconfirm/popconfirmFoundation.d.ts +4 -0
  49. package/lib/cjs/popconfirm/popconfirmFoundation.js +21 -1
  50. package/lib/cjs/popover/constants.js +2 -2
  51. package/lib/cjs/progress/constants.js +1 -1
  52. package/lib/cjs/progress/generates.js +14 -14
  53. package/lib/cjs/radio/constants.js +13 -13
  54. package/lib/cjs/rating/constants.js +1 -1
  55. package/lib/cjs/scrollList/constants.js +2 -2
  56. package/lib/cjs/select/constants.js +3 -3
  57. package/lib/cjs/select/foundation.js +2 -1
  58. package/lib/cjs/select/select.css +1 -0
  59. package/lib/cjs/select/select.scss +1 -0
  60. package/lib/cjs/select/variables.scss +1 -0
  61. package/lib/cjs/sideSheet/constants.js +2 -2
  62. package/lib/cjs/skeleton/constants.js +1 -1
  63. package/lib/cjs/slider/constants.js +7 -7
  64. package/lib/cjs/space/constants.js +1 -1
  65. package/lib/cjs/spin/constants.js +1 -1
  66. package/lib/cjs/steps/bacisSteps.scss +238 -286
  67. package/lib/cjs/steps/constants.js +2 -2
  68. package/lib/cjs/steps/fillSteps.scss +142 -148
  69. package/lib/cjs/steps/navSteps.scss +40 -60
  70. package/lib/cjs/steps/steps.css +14 -377
  71. package/lib/cjs/switch/constants.js +13 -13
  72. package/lib/cjs/table/constants.js +7 -7
  73. package/lib/cjs/table/utils.js +2 -2
  74. package/lib/cjs/tabs/constants.js +21 -21
  75. package/lib/cjs/tag/constants.js +1 -1
  76. package/lib/cjs/tag/tag.css +9 -2
  77. package/lib/cjs/tag/tag.scss +13 -4
  78. package/lib/cjs/tagInput/constants.js +1 -1
  79. package/lib/cjs/timePicker/ComboxFoundation.js +2 -2
  80. package/lib/cjs/timePicker/constants.js +3 -3
  81. package/lib/cjs/timePicker/utils/index.js +3 -3
  82. package/lib/cjs/timeline/constants.js +2 -2
  83. package/lib/cjs/toast/constants.js +3 -3
  84. package/lib/cjs/tooltip/constants.js +1 -1
  85. package/lib/cjs/tooltip/foundation.d.ts +1 -1
  86. package/lib/cjs/tooltip/foundation.js +15 -12
  87. package/lib/cjs/transfer/constants.js +1 -1
  88. package/lib/cjs/tree/constants.js +2 -2
  89. package/lib/cjs/tree/treeUtil.d.ts +1 -1
  90. package/lib/cjs/tree/treeUtil.js +1 -1
  91. package/lib/cjs/treeSelect/constants.js +3 -3
  92. package/lib/cjs/treeSelect/foundation.d.ts +5 -2
  93. package/lib/cjs/treeSelect/foundation.js +42 -17
  94. package/lib/cjs/treeSelect/treeSelect.css +5 -1
  95. package/lib/cjs/treeSelect/treeSelect.scss +6 -0
  96. package/lib/cjs/treeSelect/variables.scss +1 -1
  97. package/lib/cjs/typography/constants.js +1 -1
  98. package/lib/cjs/typography/formatNumeral.js +6 -11
  99. package/lib/cjs/upload/constants.d.ts +1 -1
  100. package/lib/cjs/upload/constants.js +2 -2
  101. package/lib/cjs/upload/foundation.js +1 -1
  102. package/lib/cjs/upload/utils.js +4 -4
  103. package/lib/cjs/utils/getMotionObjFromProps.js +2 -2
  104. package/lib/cjs/utils/touchPolyfill.js +1 -1
  105. package/lib/cjs/utils/uuid.js +2 -2
  106. package/lib/cjs/utils/warning.js +1 -1
  107. package/lib/es/anchor/constants.js +1 -1
  108. package/lib/es/anchor/foundation.js +3 -3
  109. package/lib/es/autoComplete/constants.js +3 -3
  110. package/lib/es/avatar/constants.js +1 -1
  111. package/lib/es/backtop/constants.js +1 -1
  112. package/lib/es/badge/constants.js +1 -1
  113. package/lib/es/banner/constants.js +1 -1
  114. package/lib/es/breadcrumb/constants.js +1 -1
  115. package/lib/es/button/constants.js +1 -1
  116. package/lib/es/calendar/constants.js +1 -1
  117. package/lib/es/card/constants.js +1 -1
  118. package/lib/es/carousel/constants.js +9 -9
  119. package/lib/es/cascader/constants.js +2 -2
  120. package/lib/es/cascader/foundation.js +1 -1
  121. package/lib/es/cascader/util.js +2 -2
  122. package/lib/es/checkbox/constants.js +13 -13
  123. package/lib/es/collapse/constants.js +1 -1
  124. package/lib/es/collapsible/constants.js +1 -1
  125. package/lib/es/datePicker/_utils/getInsetInputFormatToken.js +1 -1
  126. package/lib/es/datePicker/_utils/getMonthTable.js +4 -4
  127. package/lib/es/datePicker/_utils/getMonthsInYear.js +1 -1
  128. package/lib/es/datePicker/constants.js +27 -27
  129. package/lib/es/datePicker/foundation.js +3 -3
  130. package/lib/es/datePicker/inputFoundation.js +2 -2
  131. package/lib/es/datePicker/monthsGridFoundation.js +15 -4
  132. package/lib/es/descriptions/constants.js +1 -1
  133. package/lib/es/divider/constants.js +1 -1
  134. package/lib/es/dropdown/constants.js +3 -3
  135. package/lib/es/dropdown/menuFoundation.js +1 -1
  136. package/lib/es/empty/constants.js +1 -1
  137. package/lib/es/form/constants.js +1 -1
  138. package/lib/es/form/foundation.js +1 -1
  139. package/lib/es/form/utils.js +1 -1
  140. package/lib/es/grid/constants.js +1 -1
  141. package/lib/es/highlight/constants.js +1 -1
  142. package/lib/es/icons/constants.js +1 -1
  143. package/lib/es/image/constants.js +1 -1
  144. package/lib/es/input/constants.js +1 -1
  145. package/lib/es/input/textareaFoundation.js +1 -1
  146. package/lib/es/layout/constants.js +1 -1
  147. package/lib/es/list/constants.js +1 -1
  148. package/lib/es/modal/constants.js +1 -1
  149. package/lib/es/navigation/constants.js +1 -1
  150. package/lib/es/notification/constants.js +3 -3
  151. package/lib/es/pagination/constants.js +1 -1
  152. package/lib/es/popconfirm/constants.js +2 -2
  153. package/lib/es/popconfirm/popconfirmFoundation.d.ts +4 -0
  154. package/lib/es/popconfirm/popconfirmFoundation.js +20 -1
  155. package/lib/es/popover/constants.js +2 -2
  156. package/lib/es/progress/constants.js +1 -1
  157. package/lib/es/progress/generates.js +14 -14
  158. package/lib/es/radio/constants.js +13 -13
  159. package/lib/es/rating/constants.js +1 -1
  160. package/lib/es/scrollList/constants.js +2 -2
  161. package/lib/es/select/constants.js +3 -3
  162. package/lib/es/select/foundation.js +2 -1
  163. package/lib/es/select/select.css +1 -0
  164. package/lib/es/select/select.scss +1 -0
  165. package/lib/es/select/variables.scss +1 -0
  166. package/lib/es/sideSheet/constants.js +2 -2
  167. package/lib/es/skeleton/constants.js +1 -1
  168. package/lib/es/slider/constants.js +7 -7
  169. package/lib/es/space/constants.js +1 -1
  170. package/lib/es/spin/constants.js +1 -1
  171. package/lib/es/steps/bacisSteps.scss +238 -286
  172. package/lib/es/steps/constants.js +2 -2
  173. package/lib/es/steps/fillSteps.scss +142 -148
  174. package/lib/es/steps/navSteps.scss +40 -60
  175. package/lib/es/steps/steps.css +14 -377
  176. package/lib/es/switch/constants.js +13 -13
  177. package/lib/es/table/constants.js +7 -7
  178. package/lib/es/table/utils.js +2 -2
  179. package/lib/es/tabs/constants.js +21 -21
  180. package/lib/es/tag/constants.js +1 -1
  181. package/lib/es/tag/tag.css +9 -2
  182. package/lib/es/tag/tag.scss +13 -4
  183. package/lib/es/tagInput/constants.js +1 -1
  184. package/lib/es/timePicker/ComboxFoundation.js +2 -2
  185. package/lib/es/timePicker/constants.js +3 -3
  186. package/lib/es/timePicker/utils/index.js +3 -3
  187. package/lib/es/timeline/constants.js +2 -2
  188. package/lib/es/toast/constants.js +3 -3
  189. package/lib/es/tooltip/constants.js +1 -1
  190. package/lib/es/tooltip/foundation.d.ts +1 -1
  191. package/lib/es/tooltip/foundation.js +15 -12
  192. package/lib/es/transfer/constants.js +1 -1
  193. package/lib/es/tree/constants.js +2 -2
  194. package/lib/es/tree/treeUtil.d.ts +1 -1
  195. package/lib/es/tree/treeUtil.js +1 -1
  196. package/lib/es/treeSelect/constants.js +3 -3
  197. package/lib/es/treeSelect/foundation.d.ts +5 -2
  198. package/lib/es/treeSelect/foundation.js +42 -17
  199. package/lib/es/treeSelect/treeSelect.css +5 -1
  200. package/lib/es/treeSelect/treeSelect.scss +6 -0
  201. package/lib/es/treeSelect/variables.scss +1 -1
  202. package/lib/es/typography/constants.js +1 -1
  203. package/lib/es/typography/formatNumeral.js +6 -11
  204. package/lib/es/upload/constants.d.ts +1 -1
  205. package/lib/es/upload/constants.js +2 -2
  206. package/lib/es/upload/foundation.js +1 -1
  207. package/lib/es/upload/utils.js +4 -4
  208. package/lib/es/utils/getMotionObjFromProps.js +2 -2
  209. package/lib/es/utils/touchPolyfill.js +1 -1
  210. package/lib/es/utils/uuid.js +2 -2
  211. package/lib/es/utils/warning.js +1 -1
  212. package/package.json +3 -3
  213. package/popconfirm/popconfirmFoundation.ts +20 -1
  214. package/select/select.scss +1 -0
  215. package/select/variables.scss +1 -0
  216. package/steps/bacisSteps.scss +238 -286
  217. package/steps/fillSteps.scss +142 -148
  218. package/steps/navSteps.scss +40 -60
  219. package/tag/tag.scss +13 -4
  220. package/tooltip/foundation.ts +8 -5
  221. package/treeSelect/foundation.ts +39 -15
  222. package/treeSelect/treeSelect.scss +6 -0
  223. package/treeSelect/variables.scss +1 -1
  224. package/typography/formatNumeral.ts +2 -5
@@ -1,204 +1,198 @@
1
1
  $module: #{$prefix}-steps;
2
- $fill: #{$module}-item-fill;
3
-
4
- @mixin steps-item {
5
- @include box-sizing;
6
- display: flex;
7
- height: $height-steps_item;
8
- position: relative;
9
- overflow: hidden;
10
- margin-right: $spacing-steps_item-marginRight;
11
- border: $width-steps_item-border solid $color-steps-border-default;
12
- border-radius: $radius-steps_item;
13
- padding: $spacing-steps_item-paddingY $spacing-steps_item-paddingX;
14
- transition: color $transition_duration-steps_item_title-text $transition_function-steps_item_title-text $transition_delay-steps_item_title-text; // item 字体颜色动效
15
- transform:scale($transform_scale-step-item);
16
- transition: background-color $transition_duration-steps_item-backgroundColor $transition_function-steps_item_backgroundColor $transition_delay-steps_item_backgroundColor; //step backgroundColor 的transition变化
17
-
18
- .#{$module}-item-title {
19
- position: relative;
20
- // display: inline-block;
21
- @include font-size-header-5;
22
- font-weight: $font-weight-bold;
23
- width: $width-steps_item_title;
24
- @include text-overflow-hidden;
25
- color: $color-steps_main-text-default;
26
- transition: color $transition_duration-steps_item_title-text $transition_function-steps_item_title-text $transition_delay-steps_item_title-text
27
-
2
+
3
+ .#{$module} {
4
+ .#{$prefix}-col {
5
+ flex: 1;
28
6
  }
29
7
 
30
- .#{$module}-item-description {
31
- @include font-size-regular;
32
- color: $color-steps_minor-text-default;
33
- width: $width-steps_item_description;
34
- @include text-overflow-hidden;
8
+ &-vertical {
9
+ .#{$prefix}-row-flex {
10
+ flex-direction: column;
11
+ }
35
12
  }
36
13
 
37
- &-process {
38
- background-color: $color-steps_process-bg-default;
14
+ // .#{$module}-horizontal {
15
+ // .#{$module}-item-title {
16
+ // &-text {
17
+ // position: relative;
18
+ // &::after {
19
+ // content: '';
20
+ // display: block;
21
+ // width: 9999px;
22
+ // height: 1px;
23
+ // position: absolute;
24
+ // top: 12px;
25
+ // left: 120%;
26
+ // background-color: var(--semi-color-border);
27
+ // }
28
+ // }
29
+ // }
30
+ // }
39
31
 
40
- .#{$module}-item-left:not(.#{$module}-item-icon) {
41
- background: $color-steps_primary-bg-default;
32
+ .#{$module}-item {
33
+ @include box-sizing;
34
+ display: flex;
35
+ height: $height-steps_item;
36
+ position: relative;
37
+ overflow: hidden;
38
+ margin-right: $spacing-steps_item-marginRight;
39
+ border: $width-steps_item-border solid $color-steps-border-default;
40
+ border-radius: $radius-steps_item;
41
+ padding: $spacing-steps_item-paddingY $spacing-steps_item-paddingX;
42
+ transition: color $transition_duration-steps_item_title-text $transition_function-steps_item_title-text $transition_delay-steps_item_title-text; // item 字体颜色动效
43
+ transform:scale($transform_scale-step-item);
44
+ transition: background-color $transition_duration-steps_item-backgroundColor $transition_function-steps_item_backgroundColor $transition_delay-steps_item_backgroundColor; //step backgroundColor 的transition变化
45
+
46
+ .#{$module}-item-title {
47
+ position: relative;
48
+ // display: inline-block;
49
+ @include font-size-header-5;
50
+ font-weight: $font-weight-bold;
51
+ width: $width-steps_item_title;
52
+ @include text-overflow-hidden;
53
+ color: $color-steps_main-text-default;
54
+ transition: color $transition_duration-steps_item_title-text $transition_function-steps_item_title-text $transition_delay-steps_item_title-text
55
+
42
56
  }
43
57
 
44
- .#{$module}-item-title,
45
- .#{$module}-item-icon {
46
- color: $color-steps_primary-icon-default;
58
+ .#{$module}-item-description {
59
+ @include font-size-regular;
60
+ color: $color-steps_minor-text-default;
61
+ width: $width-steps_item_description;
62
+ @include text-overflow-hidden;
47
63
  }
48
- }
49
64
 
50
- &-wait {
51
- .#{$module}-item-left:not(.#{$module}-item-icon) {
52
- background: $color-steps-bg-default;
53
- }
65
+ &-process {
66
+ background-color: $color-steps_process-bg-default;
54
67
 
55
- .#{$module}-item-icon {
56
- color: $color-steps-icon-default;
68
+ .#{$module}-item-left:not(.#{$module}-item-icon) {
69
+ background: $color-steps_primary-bg-default;
70
+ }
71
+
72
+ .#{$module}-item-title,
73
+ .#{$module}-item-icon {
74
+ color: $color-steps_primary-icon-default;
75
+ }
57
76
  }
58
- }
59
77
 
60
- &-finish {
78
+ &-wait {
79
+ .#{$module}-item-left:not(.#{$module}-item-icon) {
80
+ background: $color-steps-bg-default;
81
+ }
61
82
 
62
- .#{$prefix}-icon,
63
- .#{$module}-item-title {
64
- color: $color-steps_success-text-default;
83
+ .#{$module}-item-icon {
84
+ color: $color-steps-icon-default;
85
+ }
65
86
  }
66
87
 
67
- &:hover {
68
- background-color: $color-steps-bg-hover;
88
+ &-finish {
69
89
 
70
90
  .#{$prefix}-icon,
71
91
  .#{$module}-item-title {
72
- color: $color-steps_success-text-hover;
92
+ color: $color-steps_success-text-default;
73
93
  }
74
- }
75
94
 
76
- &:active {
77
- background-color: $color-steps-bg-active;
95
+ &:hover {
96
+ background-color: $color-steps-bg-hover;
78
97
 
79
- .#{$prefix}-icon,
80
- .#{$module}-item-title {
81
- color: $color-steps_success-text-active;
98
+ .#{$prefix}-icon,
99
+ .#{$module}-item-title {
100
+ color: $color-steps_success-text-hover;
101
+ }
82
102
  }
83
- }
84
- }
85
103
 
86
- &-error {
104
+ &:active {
105
+ background-color: $color-steps-bg-active;
87
106
 
88
- .#{$prefix}-icon,
89
- .#{$module}-item-title {
90
- color: $color-steps_danger-text-default;
107
+ .#{$prefix}-icon,
108
+ .#{$module}-item-title {
109
+ color: $color-steps_success-text-active;
110
+ }
111
+ }
91
112
  }
92
113
 
93
- &:hover {
94
- background: $color-steps-bg-hover;
114
+ &-error {
95
115
 
96
116
  .#{$prefix}-icon,
97
117
  .#{$module}-item-title {
98
- color: $color-steps_danger-text-hover;
118
+ color: $color-steps_danger-text-default;
99
119
  }
100
- }
101
120
 
102
- &:active {
103
- background-color: $color-steps-bg-active;
121
+ &:hover {
122
+ background: $color-steps-bg-hover;
104
123
 
105
- .#{$prefix}-icon,
106
- .#{$module}-item-title {
107
- color: $color-steps_danger-text-active;
124
+ .#{$prefix}-icon,
125
+ .#{$module}-item-title {
126
+ color: $color-steps_danger-text-hover;
127
+ }
108
128
  }
109
- }
110
- }
111
129
 
112
- &-warning {
130
+ &:active {
131
+ background-color: $color-steps-bg-active;
113
132
 
114
- .#{$module}-item-title,
115
- .#{$prefix}-icon {
116
- color: $color-steps_warning-text-default;
133
+ .#{$prefix}-icon,
134
+ .#{$module}-item-title {
135
+ color: $color-steps_danger-text-active;
136
+ }
137
+ }
117
138
  }
118
139
 
119
- &:hover {
120
- background: $color-steps-bg-hover;
140
+ &-warning {
121
141
 
122
142
  .#{$module}-item-title,
123
143
  .#{$prefix}-icon {
124
- color: $color-steps_warning-text-hover;
144
+ color: $color-steps_warning-text-default;
125
145
  }
126
- }
127
146
 
128
- &:active {
129
- background-color: $color-steps-bg-active;
147
+ &:hover {
148
+ background: $color-steps-bg-hover;
130
149
 
131
- .#{$module}-item-title,
132
- .#{$prefix}-icon {
133
- color: $color-steps_warning-text-active;
150
+ .#{$module}-item-title,
151
+ .#{$prefix}-icon {
152
+ color: $color-steps_warning-text-hover;
153
+ }
134
154
  }
135
- }
136
- }
137
155
 
138
- &-clickable {
139
- cursor: pointer;
140
- }
141
-
142
- };
143
-
144
- @mixin steps-item-left {
145
- &-left {
146
- width: $width-steps_item_left;
147
- height: $height-steps_item_left;
148
- line-height: $font-steps_item_left-lineHeight;
149
- text-align: center;
150
- border-radius: $radius-steps_item_left;
151
- display: flex;
152
- align-items: center;
153
- justify-content: center;
154
- @include font-size-header-4;
155
- font-weight: $font-weight-bold;
156
- flex-grow: 0;
157
-
158
- &.#{$module}-item-plain {
159
- color: $color-steps-text-default;
156
+ &:active {
157
+ background-color: $color-steps-bg-active;
158
+
159
+ .#{$module}-item-title,
160
+ .#{$prefix}-icon {
161
+ color: $color-steps_warning-text-active;
162
+ }
163
+ }
160
164
  }
161
165
 
162
- &-process {
163
- background: $color-steps_process-bg-default;
166
+ &-clickable {
167
+ cursor: pointer;
164
168
  }
165
- }
166
- }
167
169
 
168
- @mixin steps-item-content {
169
- &-content {
170
- margin-left: $spacing-steps_item_content-marginLeft;
171
- flex: 1;
172
- overflow: hidden;
173
- }
174
- }
170
+ &-left {
171
+ width: $width-steps_item_left;
172
+ height: $height-steps_item_left;
173
+ line-height: $font-steps_item_left-lineHeight;
174
+ text-align: center;
175
+ border-radius: $radius-steps_item_left;
176
+ display: flex;
177
+ align-items: center;
178
+ justify-content: center;
179
+ @include font-size-header-4;
180
+ font-weight: $font-weight-bold;
181
+ flex-grow: 0;
175
182
 
176
- .#{$module} {
177
- .#{$prefix}-col {
178
- flex: 1;
179
- }
183
+ &.#{$module}-item-plain {
184
+ color: $color-steps-text-default;
185
+ }
180
186
 
181
- &-vertical {
182
- .#{$prefix}-row-flex {
183
- flex-direction: column;
187
+ &-process {
188
+ background: $color-steps_process-bg-default;
189
+ }
184
190
  }
185
- }
186
-
187
- .#{$module}-item {
188
- @include steps-item;
189
- @include steps-item-left;
190
- @include steps-item-content;
191
- }
192
- }
193
191
 
194
- // 以下 css 用于 C2D 中变体生成
195
- .#{$fill} {
196
- &.#{$module}-item {
197
- @include steps-item;
198
- }
199
-
200
- .#{$module}-item {
201
- @include steps-item-left;
202
- @include steps-item-content;
192
+ &-content {
193
+ margin-left: $spacing-steps_item_content-marginLeft;
194
+ flex: 1;
195
+ overflow: hidden;
196
+ }
203
197
  }
204
198
  }
@@ -1,83 +1,63 @@
1
1
  $module: #{$prefix}-steps;
2
2
  $item: #{$module}-item;
3
3
  $basicType: #{$module}-nav;
4
- $navItem: #{$item}-nav;
5
4
 
6
- @mixin steps-nav-item {
7
- @include box-sizing;
5
+ .#{$basicType} {
6
+ display: inline-flex;
7
+ flex-flow: row nowrap;
8
+
9
+ .#{$item} {
10
+ @include box-sizing;
8
11
 
9
- &:last-child {
10
- flex: none;
12
+ &:last-child {
13
+ flex: none;
11
14
 
12
- .#{$item}-content {
13
- width: auto;
15
+ .#{$item}-content {
16
+ width: auto;
17
+ }
14
18
  }
15
- }
16
19
 
17
- .#{$item}-container {
18
- display: flex;
19
- align-items: center;
20
- color: $color-steps_nav_item_container-text;
20
+ .#{$item}-container {
21
+ display: flex;
22
+ align-items: center;
23
+ color: $color-steps_nav_item_container-text;
24
+
25
+ .#{$item}-icon {
26
+ display: inline-flex;
27
+ flex: 1;
28
+ justify-content: center;
29
+ color: $color-steps_nav_item-icon;
30
+ min-width: $width-steps_nav_item_icon-minWidth;
31
+ }
32
+ }
21
33
 
22
- .#{$item}-icon {
23
- display: inline-flex;
34
+ .#{$item}-content {
24
35
  flex: 1;
25
- justify-content: center;
26
- color: $color-steps_nav_item-icon;
27
- min-width: $width-steps_nav_item_icon-minWidth;
36
+ display: inline-block;
28
37
  }
29
- }
30
-
31
- .#{$item}-content {
32
- flex: 1;
33
- display: inline-block;
34
- }
35
38
 
36
- .#{$item}-title {
37
- @include font-size-header-6;
38
- max-width: $width-steps_nav_item_title-maxWidth;
39
- @include text-overflow-hidden;
40
- font-weight: $font-steps_nav_item_title-fontWeight;
41
- }
42
-
43
-
44
- &-active {
45
39
  .#{$item}-title {
46
- color: $color-steps_nav_item_title-text-active;
47
- font-weight: $font-steps_nav_item_title_active-fontWeight;
40
+ @include font-size-header-6;
41
+ max-width: $width-steps_nav_item_title-maxWidth;
42
+ @include text-overflow-hidden;
43
+ font-weight: $font-steps_nav_item_title-fontWeight;
48
44
  }
49
- }
50
- }
51
-
52
- @mixin steps-nav-small {
53
- .#{$item}-title {
54
- @include font-size-regular;
55
- }
56
- }
57
45
 
58
- .#{$basicType} {
59
- display: inline-flex;
60
- flex-flow: row nowrap;
61
46
 
62
- .#{$item} {
63
- @include steps-nav-item;
47
+ &-active {
48
+ .#{$item}-title {
49
+ color: $color-steps_nav_item_title-text-active;
50
+ font-weight: $font-steps_nav_item_title_active-fontWeight;
51
+ }
52
+ }
64
53
  }
65
54
 
66
55
  &.#{$module}-small {
67
56
  .#{$item} {
68
- @include steps-nav-small;
69
- }
70
- }
71
- }
57
+ .#{$item}-title {
58
+ @include font-size-regular;
59
+ }
72
60
 
73
- // C2D 变体生成样式
74
- .#{$navItem} {
75
- &.#{$item} {
76
- @include steps-nav-item;
77
- }
78
-
79
- &.#{$item}-small {
80
- @include steps-nav-small;
61
+ }
81
62
  }
82
-
83
63
  }
package/tag/tag.scss CHANGED
@@ -64,12 +64,12 @@ $types: "ghost", "solid", "light";
64
64
  padding-left: $spacing-tag_close-paddingLeft;
65
65
  cursor: pointer;
66
66
 
67
- :hover {
68
- color: $color-tag_close-icon-hover
67
+ &:hover {
68
+ color: $color-tag_close-icon-hover;
69
69
  }
70
70
 
71
- :active {
72
- color: $color-tag_close-icon-active
71
+ &:active {
72
+ color: $color-tag_close-icon-active;
73
73
  }
74
74
  }
75
75
 
@@ -208,6 +208,15 @@ $types: "ghost", "solid", "light";
208
208
  .#{$module}-solid {
209
209
  .#{$module}-close {
210
210
  color: $color-tag_close-icon_deep-default;
211
+ opacity: .8;
212
+
213
+ &:hover {
214
+ opacity: 1.0;
215
+ }
216
+
217
+ &:active {
218
+ opacity: .9;
219
+ }
211
220
  }
212
221
  }
213
222
 
@@ -387,6 +387,8 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
387
387
 
388
388
  calcPosStyle(props: {triggerRect: DOMRect; wrapperRect: DOMRect; containerRect: PopupContainerDOMRect; position?: Position; spacing?: number; isOverFlow?: [boolean, boolean]}) {
389
389
  const { spacing, isOverFlow } = props;
390
+ const { innerWidth } = window;
391
+
390
392
  const triggerRect = (isEmpty(props.triggerRect) ? props.triggerRect : this._adapter.getTriggerBounding()) || { ...defaultRect as any };
391
393
  const containerRect = (isEmpty(props.containerRect) ? props.containerRect : this._adapter.getPopupContainerRect()) || {
392
394
  ...defaultRect,
@@ -427,7 +429,8 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
427
429
 
428
430
  const isTriggerNearLeft = middleX - containerRect.left < containerRect.right - middleX;
429
431
  const isTriggerNearTop = middleY - containerRect.top < containerRect.bottom - middleY;
430
-
432
+
433
+ const isWrapperWidthOverflow = wrapperRect.width > innerWidth;
431
434
 
432
435
  switch (position) {
433
436
  case 'top':
@@ -441,7 +444,7 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
441
444
  case 'topLeft':
442
445
  // left = pointAtCenter ? middleX - offsetXWithArrow : triggerRect.left;
443
446
  // top = triggerRect.top - SPACING;
444
- left = isWidthOverFlow ? containerRect.left : (pointAtCenter ? middleX - offsetXWithArrow : triggerRect.left);
447
+ left = isWidthOverFlow ? (isWrapperWidthOverflow ? containerRect.left : containerRect.right - wrapperRect.width ) : (pointAtCenter ? middleX - offsetXWithArrow : triggerRect.left);
445
448
  top = isHeightOverFlow ? containerRect.bottom + offsetHeight : triggerRect.top - SPACING;
446
449
  translateY = -1;
447
450
  break;
@@ -487,7 +490,7 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
487
490
  case 'bottomLeft':
488
491
  // left = pointAtCenter ? middleX - offsetXWithArrow : triggerRect.left;
489
492
  // top = triggerRect.bottom + SPACING;
490
- left = isWidthOverFlow ? containerRect.left : (pointAtCenter ? middleX - offsetXWithArrow : triggerRect.left);
493
+ left = isWidthOverFlow ? (isWrapperWidthOverflow ? containerRect.left : containerRect.right - wrapperRect.width ) : (pointAtCenter ? middleX - offsetXWithArrow : triggerRect.left);
491
494
  top = isHeightOverFlow ? containerRect.top + offsetYWithArrow - SPACING : triggerRect.top + triggerRect.height + SPACING;
492
495
  break;
493
496
  case 'bottomRight':
@@ -1126,7 +1129,7 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
1126
1129
  * 如果 trigger 是 focus 或者 hover,则它绑定了 onFocus,这里我们如果重新 focus 的话,popup 会再次打开
1127
1130
  * 因此 returnFocusOnClose 只支持 click trigger
1128
1131
  */
1129
- _focusTrigger() {
1132
+ focusTrigger() {
1130
1133
  const { trigger, returnFocusOnClose, preventScroll } = this.getProps();
1131
1134
  if (returnFocusOnClose && trigger !== 'custom') {
1132
1135
  const triggerNode = this._adapter.getTriggerNode();
@@ -1141,7 +1144,7 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
1141
1144
  if (trigger !== 'custom') {
1142
1145
  // Move the focus into the trigger first and then close the pop-up layer
1143
1146
  // to avoid the problem of opening the pop-up layer again when the focus returns to the trigger in the case of hover and focus
1144
- this._focusTrigger();
1147
+ this.focusTrigger();
1145
1148
  this.hide();
1146
1149
  }
1147
1150
  this._adapter.notifyEscKeydown(event);
@@ -95,6 +95,7 @@ export interface BasicTreeSelectProps extends Pick<BasicTreeProps,
95
95
  | 'disableStrictly'
96
96
  | 'aria-label'
97
97
  | 'checkRelation'
98
+ | 'preventScroll'
98
99
  > {
99
100
  motion?: Motion;
100
101
  mouseEnterDelay?: number;
@@ -163,7 +164,7 @@ export interface BasicTreeSelectInnerData extends Pick<BasicTreeInnerData,
163
164
  > {
164
165
  inputTriggerFocus: boolean;
165
166
  isOpen: boolean;
166
- isInput: boolean;
167
+ // isInput: boolean;
167
168
  rePosKey: number;
168
169
  dropdownMinWidth: null | number;
169
170
  isHovering: boolean;
@@ -191,7 +192,8 @@ export interface TreeSelectAdapter<P = Record<string, any>, S = Record<string, a
191
192
  toggleHovering: (bool: boolean) => void;
192
193
  notifyLoad: (newLoadedKeys: Set<string>, data: BasicTreeNodeData) => void;
193
194
  updateInputFocus: (bool: boolean) => void;
194
- updateLoadKeys: (data: BasicTreeNodeData, resolve: (value?: any) => void) => void
195
+ updateLoadKeys: (data: BasicTreeNodeData, resolve: (value?: any) => void) => void;
196
+ updateIsFocus: (bool: boolean) => void
195
197
  }
196
198
 
197
199
  // eslint-disable-next-line max-len
@@ -210,6 +212,9 @@ export default class TreeSelectFoundation<P = Record<string, any>, S = Record<st
210
212
  if (isOpen) {
211
213
  this.open();
212
214
  }
215
+ if (triggerSearchAutoFocus) {
216
+ this.handleTriggerFocus(null);
217
+ }
213
218
  }
214
219
 
215
220
  destroy() {
@@ -424,12 +429,25 @@ export default class TreeSelectFoundation<P = Record<string, any>, S = Record<st
424
429
  }
425
430
  }
426
431
 
432
+ _registerClickOutsideHandler = (e) => {
433
+ this._adapter.registerClickOutsideHandler(e => {
434
+ this.handlerTriggerBlur(e);
435
+ this.close(e);
436
+ });
437
+ }
438
+
427
439
  // Scenes that may trigger focus:
428
440
  // 1、click selection
429
441
  _notifyFocus(e: any) {
430
442
  this._adapter.notifyFocus(e);
431
443
  }
432
444
 
445
+ handleTriggerFocus(e: any) {
446
+ this._adapter.updateIsFocus(true);
447
+ this._notifyFocus(e);
448
+ this._registerClickOutsideHandler(e);
449
+ }
450
+
433
451
  // Scenes that may trigger blur
434
452
  // 1、clickOutSide
435
453
  // 2、click option / press enter, and then select complete(when multiple is false
@@ -438,6 +456,12 @@ export default class TreeSelectFoundation<P = Record<string, any>, S = Record<st
438
456
  this._adapter.notifyBlur(e);
439
457
  }
440
458
 
459
+ handlerTriggerBlur(e) {
460
+ this._adapter.updateIsFocus(false);
461
+ this._notifyBlur(e);
462
+ this._adapter.unregisterClickOutsideHandler();
463
+ }
464
+
441
465
  toggleHoverState(bool: boolean) {
442
466
  this._adapter.toggleHovering(bool);
443
467
  }
@@ -445,15 +469,10 @@ export default class TreeSelectFoundation<P = Record<string, any>, S = Record<st
445
469
  open() {
446
470
  this._adapter.openMenu();
447
471
  this._setDropdownWidth();
448
- this._adapter.registerClickOutsideHandler(e => {
449
- this.close(e);
450
- });
451
472
  }
452
473
 
453
474
  close(e: any) {
454
475
  this._adapter.closeMenu();
455
- this._adapter.unregisterClickOutsideHandler();
456
- this._notifyBlur(e);
457
476
  if (this.getProp('motionExpand')) {
458
477
  this._adapter.updateState({ motionKeys: new Set([]) });
459
478
  }
@@ -461,18 +480,22 @@ export default class TreeSelectFoundation<P = Record<string, any>, S = Record<st
461
480
 
462
481
  handleClick(e: any) {
463
482
  const isDisabled = this._isDisabled();
464
- const { isOpen, inputValue } = this.getStates();
483
+ const { isOpen, inputValue, isFocus } = this.getStates();
465
484
  const { searchPosition } = this.getProps();
466
485
  if (isDisabled) {
467
486
  return;
468
- } else if (!isOpen) {
469
- this.open();
470
- this._notifyFocus(e);
471
- } else if (isOpen) {
472
- if (searchPosition === 'trigger' && inputValue) {
473
- return;
487
+ } else {
488
+ if (!isFocus) {
489
+ this.handleTriggerFocus(e);
490
+ }
491
+ if (isOpen) {
492
+ if (searchPosition === 'trigger' && inputValue) {
493
+ return;
494
+ }
495
+ this.close(e);
496
+ } else {
497
+ this.open();
474
498
  }
475
- this.close(e);
476
499
  }
477
500
  }
478
501
 
@@ -639,6 +662,7 @@ export default class TreeSelectFoundation<P = Record<string, any>, S = Record<st
639
662
  }
640
663
  if (clickToHide && (this._isSelectToClose() || !data.children)) {
641
664
  this.close(e);
665
+ this.handlerTriggerBlur(e);
642
666
  }
643
667
  }
644
668