@aloudata/aloudata-design 0.3.2 → 0.3.5

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 (205) hide show
  1. package/es/Breadcrumb/index.d.ts +1 -0
  2. package/es/Button/index.js +3 -2
  3. package/es/Button/style/index.less +135 -126
  4. package/es/Button/style/variables.less +53 -53
  5. package/es/Checkbox/index.d.ts +1 -0
  6. package/es/ConfigProvider/defaultRenderEmpty.d.ts +4 -0
  7. package/es/ConfigProvider/defaultRenderEmpty.js +37 -0
  8. package/es/ConfigProvider/sizeContext.d.ts +9 -0
  9. package/es/ConfigProvider/sizeContext.js +12 -0
  10. package/es/Dropdown/Button.js +3 -2
  11. package/es/Empty/image/Authority.d.ts +1 -0
  12. package/es/Empty/image/Dataspace.d.ts +1 -0
  13. package/es/Empty/image/Search.d.ts +1 -0
  14. package/es/Empty/image/Simple.d.ts +1 -0
  15. package/es/Empty/image/Worksheet.d.ts +1 -0
  16. package/es/Empty/image/empty.d.ts +1 -0
  17. package/es/Icon/icons.json +418 -0
  18. package/es/Input/components/Group/index.d.ts +3 -1
  19. package/es/Input/components/Group/index.js +6 -12
  20. package/es/Input/components/Input/index.d.ts +3 -2
  21. package/es/Input/components/Input/index.js +11 -23
  22. package/es/Input/components/Password/index.js +11 -16
  23. package/es/Input/components/TextArea/index.d.ts +8 -1
  24. package/es/Input/components/TextArea/index.js +8 -1
  25. package/es/Input/style/index.less +180 -102
  26. package/es/InputNumber/index.d.ts +1 -0
  27. package/es/InputNumber/style/index.less +69 -69
  28. package/es/Menu/Divider.d.ts +1 -0
  29. package/es/Modal/index.js +4 -7
  30. package/es/Modal/style/index.less +48 -45
  31. package/es/Navigator/components/Header/index.d.ts +1 -0
  32. package/es/Navigator/components/Menu/index.d.ts +1 -0
  33. package/es/PageHeader/index.d.ts +3 -0
  34. package/es/PageHeader/index.js +3 -0
  35. package/es/PageHeader/style/index.d.ts +2 -0
  36. package/es/PageHeader/style/index.js +2 -0
  37. package/es/PageHeader/style/index.less +1 -0
  38. package/es/Popover/index.d.ts +1 -0
  39. package/es/Radio/components/Group/index.d.ts +6 -0
  40. package/es/Radio/components/Group/index.js +74 -0
  41. package/es/Radio/components/Radio/index.d.ts +3 -0
  42. package/es/Radio/components/Radio/index.js +95 -0
  43. package/es/Radio/index.d.ts +9 -2
  44. package/es/Radio/index.js +5 -3
  45. package/es/Radio/interface/radio.d.ts +24 -0
  46. package/es/Radio/interface/radio.js +1 -0
  47. package/es/Radio/interface/radioGroup.d.ts +42 -0
  48. package/es/Radio/interface/radioGroup.js +1 -0
  49. package/es/Radio/style/index.less +348 -0
  50. package/es/Select/index.js +1 -1
  51. package/es/Select/rc-select/OptionList.js +3 -2
  52. package/es/Select/rc-select/hooks/useOptions.d.ts +1 -1
  53. package/es/Select/style/index.less +50 -49
  54. package/es/Select/style/variables.less +45 -45
  55. package/es/Select/utils/iconUtil.d.ts +2 -2
  56. package/es/Select/utils/iconUtil.js +6 -4
  57. package/es/Steps/components/ProcessIcon/index.d.ts +6 -0
  58. package/es/Steps/components/ProcessIcon/index.js +8 -0
  59. package/es/Steps/components/Step/index.d.ts +20 -0
  60. package/es/Steps/components/Step/index.js +45 -0
  61. package/es/Steps/index.d.ts +36 -2
  62. package/es/Steps/index.js +30 -1
  63. package/es/Steps/matchMedia.mock.d.ts +1 -0
  64. package/es/Steps/matchMedia.mock.js +17 -0
  65. package/es/Steps/style/index.less +251 -0
  66. package/es/Switch/index.d.ts +46 -2
  67. package/es/Switch/index.js +71 -1
  68. package/es/Switch/style/index.less +129 -0
  69. package/es/Table/Table.d.ts +2 -1
  70. package/es/Table/Table.js +223 -330
  71. package/es/Table/components/Empty/index.d.ts +3 -0
  72. package/es/Table/components/Empty/index.js +16 -0
  73. package/es/Table/components/Loading/index.d.ts +3 -0
  74. package/es/Table/components/Loading/index.js +18 -0
  75. package/es/Table/components/TableBodyRowList/index.d.ts +13 -0
  76. package/es/Table/components/TableBodyRowList/index.js +91 -0
  77. package/es/Table/components/TableHead/index.d.ts +23 -0
  78. package/es/Table/components/TableHead/index.js +262 -0
  79. package/es/Table/constant.d.ts +1 -0
  80. package/es/Table/constant.js +1 -0
  81. package/es/Table/hooks/useFrame.d.ts +7 -0
  82. package/es/Table/hooks/useFrame.js +90 -0
  83. package/es/Table/hooks/useTableColumn.d.ts +28 -0
  84. package/es/Table/hooks/useTableColumn.js +53 -0
  85. package/es/Table/interface.d.ts +3 -2
  86. package/es/Table/style/index.less +41 -37
  87. package/es/Table/style/index.less.d.ts +126 -0
  88. package/es/Table/style/variable.less +10 -0
  89. package/es/Table/style/variable.less.d.ts +7 -0
  90. package/es/Table/utils.d.ts +15 -0
  91. package/es/Table/utils.js +131 -0
  92. package/es/Tabs/index.js +3 -2
  93. package/es/Tabs/style/index.less +25 -25
  94. package/es/_utils/hooks/useId.d.ts +4 -0
  95. package/es/_utils/hooks/useId.js +23 -0
  96. package/es/index.d.ts +7 -5
  97. package/es/index.js +2 -1
  98. package/es/locale-provider/index.d.ts +5 -1
  99. package/es/style/index.d.ts +0 -1
  100. package/es/style/index.js +0 -1
  101. package/es/style/index.less +2 -2
  102. package/es/style/themes/default/index.less +30 -30
  103. package/lib/Breadcrumb/index.d.ts +1 -0
  104. package/lib/Button/index.js +5 -3
  105. package/lib/Button/style/index.less +135 -126
  106. package/lib/Button/style/variables.less +53 -53
  107. package/lib/Checkbox/index.d.ts +1 -0
  108. package/lib/ConfigProvider/defaultRenderEmpty.d.ts +4 -0
  109. package/lib/ConfigProvider/defaultRenderEmpty.js +55 -0
  110. package/lib/ConfigProvider/sizeContext.d.ts +9 -0
  111. package/lib/ConfigProvider/sizeContext.js +30 -0
  112. package/lib/Dropdown/Button.js +7 -5
  113. package/lib/Empty/image/Authority.d.ts +1 -0
  114. package/lib/Empty/image/Dataspace.d.ts +1 -0
  115. package/lib/Empty/image/Search.d.ts +1 -0
  116. package/lib/Empty/image/Simple.d.ts +1 -0
  117. package/lib/Empty/image/Worksheet.d.ts +1 -0
  118. package/lib/Empty/image/empty.d.ts +1 -0
  119. package/lib/Icon/icons.json +418 -0
  120. package/lib/Input/components/Group/index.d.ts +3 -1
  121. package/lib/Input/components/Group/index.js +7 -12
  122. package/lib/Input/components/Input/index.d.ts +3 -2
  123. package/lib/Input/components/Input/index.js +13 -23
  124. package/lib/Input/components/Password/index.js +13 -17
  125. package/lib/Input/components/TextArea/index.d.ts +8 -1
  126. package/lib/Input/components/TextArea/index.js +10 -1
  127. package/lib/Input/style/index.less +180 -102
  128. package/lib/InputNumber/index.d.ts +1 -0
  129. package/lib/InputNumber/style/index.less +69 -69
  130. package/lib/Menu/Divider.d.ts +1 -0
  131. package/lib/Modal/index.js +8 -10
  132. package/lib/Modal/style/index.less +48 -45
  133. package/lib/Navigator/components/Header/index.d.ts +1 -0
  134. package/lib/Navigator/components/Menu/index.d.ts +1 -0
  135. package/lib/PageHeader/index.d.ts +3 -0
  136. package/lib/PageHeader/index.js +15 -0
  137. package/lib/PageHeader/style/index.d.ts +2 -0
  138. package/lib/PageHeader/style/index.js +5 -0
  139. package/lib/PageHeader/style/index.less +1 -0
  140. package/lib/Popover/index.d.ts +1 -0
  141. package/lib/Radio/components/Group/index.d.ts +6 -0
  142. package/lib/Radio/components/Group/index.js +95 -0
  143. package/lib/Radio/components/Radio/index.d.ts +3 -0
  144. package/lib/Radio/components/Radio/index.js +115 -0
  145. package/lib/Radio/index.d.ts +9 -2
  146. package/lib/Radio/index.js +5 -3
  147. package/lib/Radio/interface/radio.d.ts +24 -0
  148. package/lib/Radio/interface/radio.js +5 -0
  149. package/lib/Radio/interface/radioGroup.d.ts +42 -0
  150. package/lib/Radio/interface/radioGroup.js +5 -0
  151. package/lib/Radio/style/index.less +348 -0
  152. package/lib/Select/index.js +1 -1
  153. package/lib/Select/rc-select/OptionList.js +7 -5
  154. package/lib/Select/rc-select/hooks/useOptions.d.ts +1 -1
  155. package/lib/Select/style/index.less +50 -49
  156. package/lib/Select/style/variables.less +45 -45
  157. package/lib/Select/utils/iconUtil.d.ts +2 -2
  158. package/lib/Select/utils/iconUtil.js +10 -8
  159. package/lib/Steps/components/ProcessIcon/index.d.ts +6 -0
  160. package/lib/Steps/components/ProcessIcon/index.js +19 -0
  161. package/lib/Steps/components/Step/index.d.ts +20 -0
  162. package/lib/Steps/components/Step/index.js +61 -0
  163. package/lib/Steps/index.d.ts +36 -2
  164. package/lib/Steps/index.js +34 -1
  165. package/lib/Steps/matchMedia.mock.d.ts +1 -0
  166. package/lib/Steps/matchMedia.mock.js +17 -0
  167. package/lib/Steps/style/index.less +251 -0
  168. package/lib/Switch/index.d.ts +46 -2
  169. package/lib/Switch/index.js +78 -1
  170. package/lib/Switch/style/index.less +129 -0
  171. package/lib/Table/Table.d.ts +2 -1
  172. package/lib/Table/Table.js +229 -332
  173. package/lib/Table/components/Empty/index.d.ts +3 -0
  174. package/lib/Table/components/Empty/index.js +28 -0
  175. package/lib/Table/components/Loading/index.d.ts +3 -0
  176. package/lib/Table/components/Loading/index.js +31 -0
  177. package/lib/Table/components/TableBodyRowList/index.d.ts +13 -0
  178. package/lib/Table/components/TableBodyRowList/index.js +110 -0
  179. package/lib/Table/components/TableHead/index.d.ts +23 -0
  180. package/lib/Table/components/TableHead/index.js +286 -0
  181. package/lib/Table/constant.d.ts +1 -0
  182. package/lib/Table/constant.js +1 -0
  183. package/lib/Table/hooks/useFrame.d.ts +7 -0
  184. package/lib/Table/hooks/useFrame.js +98 -0
  185. package/lib/Table/hooks/useTableColumn.d.ts +28 -0
  186. package/lib/Table/hooks/useTableColumn.js +66 -0
  187. package/lib/Table/interface.d.ts +3 -2
  188. package/lib/Table/style/index.less +41 -37
  189. package/lib/Table/style/index.less.d.ts +126 -0
  190. package/lib/Table/style/variable.less +10 -0
  191. package/lib/Table/style/variable.less.d.ts +7 -0
  192. package/lib/Table/utils.d.ts +15 -0
  193. package/lib/Table/utils.js +147 -0
  194. package/lib/Tabs/index.js +5 -3
  195. package/lib/Tabs/style/index.less +25 -25
  196. package/lib/_utils/hooks/useId.d.ts +4 -0
  197. package/lib/_utils/hooks/useId.js +36 -0
  198. package/lib/index.d.ts +7 -5
  199. package/lib/index.js +8 -0
  200. package/lib/locale-provider/index.d.ts +5 -1
  201. package/lib/style/index.d.ts +0 -1
  202. package/lib/style/index.js +0 -2
  203. package/lib/style/index.less +2 -2
  204. package/lib/style/themes/default/index.less +30 -30
  205. package/package.json +2 -1
@@ -1,42 +1,43 @@
1
1
  /* stylelint-disable no-descending-specificity */
2
2
  @import './select.less';
3
3
  @import './variables.less';
4
+ @import '../../Empty/style/index.less';
4
5
 
5
6
  .ald-select {
6
7
  .ant-select-selector:not(.ant-select-customize-input) {
7
- background-color: @selector-bgColor-default;
8
- border-color: @selector-borderColor-default;
8
+ background-color: @selector-bg-color-default;
9
+ border-color: @selector-border-color-default;
9
10
 
10
11
  .ald-select-selector-prefix {
11
- color: @selector-labelColor-default;
12
+ color: @selector-label-color-default;
12
13
  }
13
14
 
14
15
  .ant-select-selection-placeholder {
15
- color: @selector-placeholderColor-default;
16
+ color: @selector-placeholder-color-default;
16
17
  }
17
18
 
18
19
  .ant-select-selection-item {
19
- color: @selector-valueColor-default;
20
+ color: @selector-value-color-default;
20
21
  background-color: initial;
21
22
  border: none;
22
23
  }
23
24
  }
24
25
 
25
26
  &.ant-select-disabled .ant-select-selector:not(.ant-select-customize-input) {
26
- background-color: @selector-bgColor-disabled;
27
- border-color: @selector-borderColor-disabled;
27
+ background-color: @selector-bg-color-disabled;
28
+ border-color: @selector-border-color-disabled;
28
29
  cursor: initial;
29
30
 
30
31
  .ald-select-selector-prefix {
31
- color: @selector-labelColor-disabled;
32
+ color: @selector-label-color-disabled;
32
33
  }
33
34
 
34
35
  .ant-select-selection-placeholder {
35
- color: @selector-placeholderColor-disabled;
36
+ color: @selector-placeholder-color-disabled;
36
37
  }
37
38
 
38
39
  .ant-select-selection-item {
39
- color: @selector-valueColor-disabled;
40
+ color: @selector-value-color-disabled;
40
41
  background-color: initial;
41
42
  border: none;
42
43
  }
@@ -48,8 +49,8 @@
48
49
 
49
50
  &.ant-select-multiple.ant-select-disabled.ant-select:not(.ant-select-customize-input) {
50
51
  .ant-select-selector {
51
- background-color: @selector-bgColor-disabled;
52
- border-color: @selector-borderColor-disabled;
52
+ background-color: @selector-bg-color-disabled;
53
+ border-color: @selector-border-color-disabled;
53
54
  cursor: initial;
54
55
  }
55
56
  }
@@ -57,7 +58,7 @@
57
58
  &:not(.ant-select-disabled):hover,
58
59
  &.ant-select.ant-select-focused:not(.ant-select-disabled) {
59
60
  .ant-select-selector {
60
- border-color: @selector-borderColor-active;
61
+ border-color: @selector-border-color-active;
61
62
  box-shadow: 0 0 0 0.5px @B60;
62
63
 
63
64
  &:focus-visible {
@@ -65,18 +66,18 @@
65
66
  }
66
67
 
67
68
  .ald-select-selector-prefix {
68
- color: @selector-labelColor-active;
69
+ color: @selector-label-color-active;
69
70
  }
70
71
 
71
72
  .ant-select-selection-placeholder {
72
- color: @selector-placeholderColor-active;
73
+ color: @selector-placeholder-color-active;
73
74
  }
74
75
  }
75
76
 
76
77
  &.ant-select-open {
77
78
  .ant-select-selection-overflow,
78
79
  .ant-select-selection-item {
79
- color: @selector-valueColor-active;
80
+ color: @selector-value-color-active;
80
81
  background-color: initial;
81
82
  border: none;
82
83
  }
@@ -84,7 +85,7 @@
84
85
 
85
86
  &:not(.ant-select-open) {
86
87
  .ant-select-selector {
87
- border-color: @selector-borderColor-default;
88
+ border-color: @selector-border-color-default;
88
89
  box-shadow: none;
89
90
 
90
91
  &:focus-visible {
@@ -92,11 +93,11 @@
92
93
  }
93
94
 
94
95
  .ald-select-selector-prefix {
95
- color: @selector-labelColor-default;
96
+ color: @selector-label-color-default;
96
97
  }
97
98
 
98
99
  .ant-select-selection-placeholder {
99
- color: @selector-placeholderColor-default;
100
+ color: @selector-placeholder-color-default;
100
101
  }
101
102
  }
102
103
  }
@@ -123,117 +124,117 @@
123
124
  }
124
125
 
125
126
  &.ald-select-large {
126
- font-size: @selector-fontSize-large;
127
+ font-size: @selector-font-size-large;
127
128
 
128
129
  .ant-select-selector {
129
130
  align-items: center;
130
131
  height: @selector-height-large;
131
- padding: 0 @selector-paddingHorizontal-large;
132
- line-height: @selector-lineHeight-large;
133
- border-radius: @selector-borderRadius-large;
132
+ padding: 0 @selector-padding-horizontal-large;
133
+ line-height: @selector-line-height-large;
134
+ border-radius: @selector-border-radius-large;
134
135
 
135
136
  .ald-select-selector-prefix {
136
137
  display: flex;
137
138
  align-items: center;
138
- margin-right: @prefix-marginRight-large;
139
+ margin-right: @prefix-margin-right-large;
139
140
  }
140
141
 
141
142
  .ant-select-selection-item,
142
143
  .ant-select-selection-placeholder {
143
- line-height: @selector-lineHeight-large;
144
+ line-height: @selector-line-height-large;
144
145
  }
145
146
  }
146
147
 
147
148
  &.ant-select-show-arrow {
148
149
  .ant-select-selector {
149
- padding-right: @selector-paddingHorizontal-large + @selector-fontSize-large;
150
+ padding-right: @selector-padding-horizontal-large + @selector-font-size-large;
150
151
  }
151
152
  }
152
153
  }
153
154
 
154
155
  &.ald-select-middle {
155
- font-size: @selector-fontSize-middle;
156
+ font-size: @selector-font-size-middle;
156
157
 
157
158
  .ant-select-selector {
158
159
  align-items: center;
159
160
  height: @selector-height-middle;
160
- padding: 0 @selector-paddingHorizontal-middle;
161
- line-height: @selector-lineHeight-middle;
162
- border-radius: @selector-borderRadius-middle;
161
+ padding: 0 @selector-padding-horizontal-middle;
162
+ line-height: @selector-line-height-middle;
163
+ border-radius: @selector-border-radius-middle;
163
164
 
164
165
  .ald-select-selector-prefix {
165
166
  display: flex;
166
167
  align-items: center;
167
- margin-right: @prefix-marginRight-middle;
168
+ margin-right: @prefix-margin-right-middle;
168
169
  }
169
170
 
170
171
  .ant-select-selection-item,
171
172
  .ant-select-selection-placeholder {
172
- line-height: @selector-lineHeight-middle;
173
+ line-height: @selector-line-height-middle;
173
174
  }
174
175
  }
175
176
 
176
177
  &.ant-select-show-arrow {
177
178
  .ant-select-selector {
178
- padding-right: @selector-paddingHorizontal-middle + @selector-fontSize-middle;
179
+ padding-right: @selector-padding-horizontal-middle + @selector-font-size-middle;
179
180
  }
180
181
  }
181
182
  }
182
183
 
183
184
  &.ald-select-small {
184
- font-size: @selector-fontSize-small;
185
+ font-size: @selector-font-size-small;
185
186
 
186
187
  .ant-select-selector {
187
188
  align-items: center;
188
189
  height: @selector-height-small;
189
- padding: 0 @selector-paddingHorizontal-small;
190
- line-height: @selector-lineHeight-small;
191
- border-radius: @selector-borderRadius-small;
190
+ padding: 0 @selector-padding-horizontal-small;
191
+ line-height: @selector-line-height-small;
192
+ border-radius: @selector-border-radius-small;
192
193
 
193
194
  .ald-select-selector-prefix {
194
195
  display: flex;
195
196
  align-items: center;
196
- margin-right: @prefix-marginRight-small;
197
+ margin-right: @prefix-margin-right-small;
197
198
  }
198
199
 
199
200
  .ant-select-selection-item,
200
201
  .ant-select-selection-placeholder {
201
- line-height: @selector-lineHeight-small;
202
+ line-height: @selector-line-height-small;
202
203
  }
203
204
  }
204
205
 
205
206
  &.ant-select-show-arrow {
206
207
  .ant-select-selector {
207
- padding-right: @selector-paddingHorizontal-small + @selector-fontSize-small;
208
+ padding-right: @selector-padding-horizontal-small + @selector-font-size-small;
208
209
  }
209
210
  }
210
211
  }
211
212
 
212
213
  &.ald-select-mini {
213
- font-size: @selector-fontSize-mini;
214
+ font-size: @selector-font-size-mini;
214
215
 
215
216
  .ant-select-selector {
216
217
  align-items: center;
217
218
  height: @selector-height-mini;
218
- padding: 0 @selector-paddingHorizontal-mini;
219
- line-height: @selector-lineHeight-mini;
220
- border-radius: @selector-borderRadius-mini;
219
+ padding: 0 @selector-padding-horizontal-mini;
220
+ line-height: @selector-line-height-mini;
221
+ border-radius: @selector-border-radius-mini;
221
222
 
222
223
  .ald-select-selector-prefix {
223
224
  display: flex;
224
225
  align-items: center;
225
- margin-right: @prefix-marginRight-mini;
226
+ margin-right: @prefix-margin-right-mini;
226
227
  }
227
228
 
228
229
  .ant-select-selection-item,
229
230
  .ant-select-selection-placeholder {
230
- line-height: @selector-lineHeight-mini;
231
+ line-height: @selector-line-height-mini;
231
232
  }
232
233
  }
233
234
 
234
235
  &.ant-select-show-arrow {
235
236
  .ant-select-selector {
236
- padding-right: @selector-paddingHorizontal-mini + @selector-fontSize-mini;
237
+ padding-right: @selector-padding-horizontal-mini + @selector-font-size-mini;
237
238
  }
238
239
  }
239
240
  }
@@ -302,11 +303,11 @@
302
303
  margin: 0 4px;
303
304
  padding: 0;
304
305
  font-size: 14px;
305
- background-color: @select-option-bgColor;
306
+ background-color: @select-option-bg-color;
306
307
  border-radius: 6px;
307
308
 
308
309
  &:hover {
309
- background-color: @select-option-bgColor-hover;
310
+ background-color: @select-option-bg-color-hover;
310
311
  }
311
312
 
312
313
  .ald-select-single-check {
@@ -3,65 +3,65 @@
3
3
 
4
4
  // large size
5
5
  @selector-height-large: 40px;
6
- @selector-borderRadius-large: 8px;
7
- @selector-fontSize-large: 16px;
8
- @selector-lineHeight-large: 24px;
9
- @prefix-marginRight-large: 8px;
10
- @selector-paddingHorizontal-large: 11px;
6
+ @selector-border-radius-large: 8px;
7
+ @selector-font-size-large: 16px;
8
+ @selector-line-height-large: 24px;
9
+ @prefix-margin-right-large: 8px;
10
+ @selector-padding-horizontal-large: 11px;
11
11
 
12
12
  // medium size
13
13
  @selector-height-middle: 32px;
14
- @selector-borderRadius-middle: 6px;
15
- @selector-fontSize-middle: 14px;
16
- @selector-lineHeight-middle: 20px;
17
- @prefix-marginRight-middle: 8px;
18
- @selector-paddingHorizontal-middle: 11px;
14
+ @selector-border-radius-middle: 6px;
15
+ @selector-font-size-middle: 14px;
16
+ @selector-line-height-middle: 20px;
17
+ @prefix-margin-right-middle: 8px;
18
+ @selector-padding-horizontal-middle: 11px;
19
19
 
20
20
  // small size
21
21
  @selector-height-small: 28px;
22
- @selector-borderRadius-small: 4px;
23
- @selector-fontSize-small: 12px;
24
- @selector-lineHeight-small: 16px;
25
- @prefix-marginRight-small: 4px;
26
- @selector-paddingHorizontal-small: 7px;
22
+ @selector-border-radius-small: 4px;
23
+ @selector-font-size-small: 12px;
24
+ @selector-line-height-small: 16px;
25
+ @prefix-margin-right-small: 4px;
26
+ @selector-padding-horizontal-small: 7px;
27
27
  // mini size
28
28
  @selector-height-mini: 24px;
29
- @selector-borderRadius-mini: 4px;
30
- @selector-fontSize-mini: 12px;
31
- @selector-lineHeight-mini: 16px;
32
- @prefix-marginRight-mini: 4px;
33
- @selector-paddingHorizontal-mini: 7px;
29
+ @selector-border-radius-mini: 4px;
30
+ @selector-font-size-mini: 12px;
31
+ @selector-line-height-mini: 16px;
32
+ @prefix-margin-right-mini: 4px;
33
+ @selector-padding-horizontal-mini: 7px;
34
34
 
35
35
  //default status
36
- @selector-borderColor-default: @NL90;
37
- @selector-placeholderColor-default: @NL80;
38
- @selector-valueColor-default: @NL0;
39
- @selector-labelColor-default: @NL50;
40
- @selector-bgColor-default: @BG97;
36
+ @selector-border-color-default: @NL90;
37
+ @selector-placeholder-color-default: @NL80;
38
+ @selector-value-color-default: @NL0;
39
+ @selector-label-color-default: @NL50;
40
+ @selector-bg-color-default: @BG97;
41
41
  //active status
42
- @selector-borderColor-active: @B60;
43
- @selector-placeholderColor-active: @NL80;
44
- @selector-valueColor-active: @NL50;
45
- @selector-labelColor-active: @NL50;
46
- @selector-bgColor-active: @BG97;
42
+ @selector-border-color-active: @B60;
43
+ @selector-placeholder-color-active: @NL80;
44
+ @selector-value-color-active: @NL50;
45
+ @selector-label-color-active: @NL50;
46
+ @selector-bg-color-active: @BG97;
47
47
  //disable status
48
- @selector-borderColor-disabled: @NL90;
49
- @selector-placeholderColor-disabled: @NL80;
50
- @selector-valueColor-disabled: @NL60;
51
- @selector-labelColor-disabled: @NL60;
52
- @selector-bgColor-disabled: @BG95;
48
+ @selector-border-color-disabled: @NL90;
49
+ @selector-placeholder-color-disabled: @NL80;
50
+ @selector-value-color-disabled: @NL60;
51
+ @selector-label-color-disabled: @NL60;
52
+ @selector-bg-color-disabled: @BG95;
53
53
  //-----option
54
- @select-option-bgColor: @BG100;
54
+ @select-option-bg-color: @BG100;
55
55
  @select-option-color: @NL0;
56
- @select-option-bgColor-hover: @NL97;
56
+ @select-option-bg-color-hover: @NL97;
57
57
 
58
58
  :export {
59
- SELECTOR_PADDING_HORIZONTAL_LARGE: @selector-paddingHorizontal-large;
60
- SELECTOR_PADDING_HORIZONTAL_MIDDLE: @selector-paddingHorizontal-middle;
61
- SELECTOR_PADDING_HORIZONTAL_SMALL: @selector-paddingHorizontal-small;
62
- SELECTOR_PADDING_HORIZONTAL_MINI: @selector-paddingHorizontal-mini;
63
- PREFIX_MARGIN_RIGHT_LARGE: @prefix-marginRight-large;
64
- PREFIX_MARGIN_RIGHT_MIDDLE: @prefix-marginRight-middle;
65
- PREFIX_MARGIN_RIGHT_SMALL: @prefix-marginRight-small;
66
- PREFIX_MARGIN_RIGHT_MINI: @prefix-marginRight-mini;
59
+ SELECTOR_PADDING_HORIZONTAL_LARGE: @selector-padding-horizontal-large;
60
+ SELECTOR_PADDING_HORIZONTAL_MIDDLE: @selector-padding-horizontal-middle;
61
+ SELECTOR_PADDING_HORIZONTAL_SMALL: @selector-padding-horizontal-small;
62
+ SELECTOR_PADDING_HORIZONTAL_MINI: @selector-padding-horizontal-mini;
63
+ PREFIX_MARGIN_RIGHT_LARGE: @prefix-margin-right-large;
64
+ PREFIX_MARGIN_RIGHT_MIDDLE: @prefix-margin-right-middle;
65
+ PREFIX_MARGIN_RIGHT_SMALL: @prefix-margin-right-small;
66
+ PREFIX_MARGIN_RIGHT_MINI: @prefix-margin-right-mini;
67
67
  }
@@ -18,7 +18,7 @@ export default function getIcons({ suffixIcon, clearIcon, menuItemSelectedIcon,
18
18
  open: boolean;
19
19
  showSearch: boolean;
20
20
  }) => JSX.Element);
21
- itemIcon: number | boolean | JSX.Element | React.ReactFragment | ((props: any) => React.ReactNode) | null;
22
- removeIcon: number | boolean | JSX.Element | React.ReactFragment | ((props: any) => React.ReactNode) | null;
21
+ itemIcon: number | boolean | React.ReactFragment | JSX.Element | ((props: any) => React.ReactNode) | null;
22
+ removeIcon: number | boolean | React.ReactFragment | JSX.Element | ((props: any) => React.ReactNode) | null;
23
23
  };
24
24
  export {};
@@ -1,10 +1,12 @@
1
+ import "@aloudata/icons-react/styles/index.less";
2
+ import _CancelFill from "@aloudata/icons-react/es/icons/CancelFill";
3
+ import "@aloudata/icons-react/styles/index.less";
4
+ import _ArrowsDownLine from "@aloudata/icons-react/es/icons/ArrowsDownLine";
1
5
  import * as React from 'react';
2
6
  import LoadingOutlined from '@ant-design/icons/LoadingOutlined';
3
7
  import CheckOutlined from '@ant-design/icons/CheckOutlined';
4
8
  import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled';
5
- import CancelFill from '../../Icon/icons/CancelFill';
6
9
  import Color from '../../style/themes/default/themeColor.module.less';
7
- import ArrowsDownLine from '../../Icon/icons/ArrowsDownLine';
8
10
  export default function getIcons(_ref) {
9
11
  var suffixIcon = _ref.suffixIcon,
10
12
  clearIcon = _ref.clearIcon,
@@ -46,7 +48,7 @@ export default function getIcons(_ref) {
46
48
  // if (open && showSearch) {
47
49
  // return getSuffixIconNode(<SearchOutlined className={iconCls} />);
48
50
  // }
49
- return getSuffixIconNode( /*#__PURE__*/React.createElement(ArrowsDownLine, {
51
+ return getSuffixIconNode( /*#__PURE__*/React.createElement(_ArrowsDownLine, {
50
52
  color: Color.NL50,
51
53
  className: iconCls
52
54
  }));
@@ -69,7 +71,7 @@ export default function getIcons(_ref) {
69
71
  if (removeIcon !== undefined) {
70
72
  mergedRemoveIcon = removeIcon;
71
73
  } else {
72
- mergedRemoveIcon = /*#__PURE__*/React.createElement(CancelFill, {
74
+ mergedRemoveIcon = /*#__PURE__*/React.createElement(_CancelFill, {
73
75
  color: Color.NL50,
74
76
  size: '1em'
75
77
  });
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ interface IProcessIconProps {
3
+ type: 'process' | 'wait';
4
+ }
5
+ export declare function ProcessIcon({ type }: IProcessIconProps): JSX.Element;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ import classNames from 'classnames';
2
+ import React from 'react';
3
+ export function ProcessIcon(_ref) {
4
+ var type = _ref.type;
5
+ return /*#__PURE__*/React.createElement("span", {
6
+ className: classNames("".concat(type, "-icon-box"), 'icon-box')
7
+ });
8
+ }
@@ -0,0 +1,20 @@
1
+ import { ReactNode } from 'react';
2
+ export declare type TStatus = 'wait' | 'process' | 'finish' | 'error';
3
+ export interface IStepProps {
4
+ /**
5
+ * @description 当前步骤的描述信息
6
+ * @default -
7
+ */
8
+ description?: ReactNode;
9
+ /**
10
+ * @description 当前步骤的状态,可选`wait`、`process`、`finish`、`error`
11
+ * @default wait
12
+ */
13
+ status?: TStatus;
14
+ /**
15
+ * @description 标题
16
+ * @default -
17
+ */
18
+ title?: ReactNode;
19
+ }
20
+ export declare function Step(props: IStepProps): JSX.Element;
@@ -0,0 +1,45 @@
1
+ import "@aloudata/icons-react/styles/index.less";
2
+ import _CheckFill from "@aloudata/icons-react/es/icons/CheckFill";
3
+ import "@aloudata/icons-react/styles/index.less";
4
+ import _ErrorFill from "@aloudata/icons-react/es/icons/ErrorFill";
5
+ import "antd/es/steps/style";
6
+ import _Steps from "antd/es/steps";
7
+ import React from 'react';
8
+ import { ProcessIcon } from '../ProcessIcon';
9
+ var AntdStep = _Steps.Step;
10
+ export function Step(props) {
11
+ var status = props.status;
12
+
13
+ var getIcon = function getIcon(stepStatus) {
14
+ if (stepStatus === 'error') {
15
+ return /*#__PURE__*/React.createElement("span", {
16
+ className: "error-icon-box icon-box"
17
+ }, /*#__PURE__*/React.createElement(_ErrorFill, {
18
+ size: 16
19
+ }));
20
+ }
21
+
22
+ if (stepStatus === 'finish') {
23
+ return /*#__PURE__*/React.createElement("span", {
24
+ className: "check-icon-box icon-box"
25
+ }, /*#__PURE__*/React.createElement(_CheckFill, {
26
+ size: 16
27
+ }));
28
+ }
29
+
30
+ if (stepStatus === 'process') {
31
+ return /*#__PURE__*/React.createElement(ProcessIcon, {
32
+ type: "process"
33
+ });
34
+ } // wait
35
+
36
+
37
+ return /*#__PURE__*/React.createElement(ProcessIcon, {
38
+ type: "wait"
39
+ });
40
+ };
41
+
42
+ return /*#__PURE__*/React.createElement(AntdStep, Object.assign({}, props, {
43
+ icon: getIcon(status)
44
+ }));
45
+ }
@@ -1,3 +1,37 @@
1
- import Steps, { StepsProps, StepProps } from 'antd/es/steps';
2
- export { StepsProps, StepProps };
1
+ import { ReactElement } from 'react';
2
+ import { IStepProps } from './components/Step';
3
+ export type { IStepProps };
4
+ export declare type TStatus = 'wait' | 'process' | 'finish' | 'error';
5
+ export interface IStepsProps {
6
+ /**
7
+ * @description Steps最外层类名
8
+ * @default -
9
+ */
10
+ className?: string;
11
+ /**
12
+ * @description 当前步骤,从0开始计数,可以通过在子Step中的设置status字段覆盖状态
13
+ * @default 0
14
+ */
15
+ current?: number;
16
+ /**
17
+ * @description 指定步骤条方向,水平:`horizontal`和竖直:`vertical`
18
+ * @default horizontal
19
+ */
20
+ direction?: 'horizontal' | 'vertical';
21
+ /**
22
+ * @description 默认开始步骤,从0开始计数
23
+ * @default 0
24
+ */
25
+ defaultCurrent?: number;
26
+ /**
27
+ * @description current属性指向步骤的状态,可选`wait`、`process`、`finish`、‘error
28
+ * @default process
29
+ */
30
+ status?: TStatus;
31
+ children?: ReactElement<IStepProps>[];
32
+ }
33
+ declare function Steps({ className, current, direction, defaultCurrent, status, children, }: IStepsProps): JSX.Element;
34
+ declare namespace Steps {
35
+ var Step: typeof import("./components/Step").Step;
36
+ }
3
37
  export default Steps;
package/es/Steps/index.js CHANGED
@@ -1,2 +1,31 @@
1
- import Steps from 'antd/es/steps';
1
+ import "antd/es/steps/style";
2
+ import _Steps from "antd/es/steps";
3
+ import React from 'react';
4
+ import classNames from 'classnames';
5
+ import { Step } from './components/Step';
6
+ var INITIAL = 0;
7
+
8
+ function Steps(_ref) {
9
+ var className = _ref.className,
10
+ current = _ref.current,
11
+ _ref$direction = _ref.direction,
12
+ direction = _ref$direction === void 0 ? 'horizontal' : _ref$direction,
13
+ _ref$defaultCurrent = _ref.defaultCurrent,
14
+ defaultCurrent = _ref$defaultCurrent === void 0 ? INITIAL : _ref$defaultCurrent,
15
+ status = _ref.status,
16
+ children = _ref.children;
17
+ return /*#__PURE__*/React.createElement(_Steps, {
18
+ className: classNames('ald-steps', className),
19
+ current: current,
20
+ direction: direction,
21
+ initial: defaultCurrent,
22
+ status: status,
23
+ labelPlacement: "vertical",
24
+ responsive: false,
25
+ size: "default",
26
+ type: "default"
27
+ }, children);
28
+ }
29
+
30
+ Steps.Step = Step;
2
31
  export default Steps;
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(window, 'matchMedia', {
4
+ writable: true,
5
+ value: jest.fn().mockImplementation(function (query) {
6
+ return {
7
+ matches: false,
8
+ media: query,
9
+ onchange: null,
10
+ addListener: jest.fn(),
11
+ removeListener: jest.fn(),
12
+ addEventListener: jest.fn(),
13
+ removeEventListener: jest.fn(),
14
+ dispatchEvent: jest.fn()
15
+ };
16
+ })
17
+ });