@aloudata/aloudata-design 0.3.1 → 0.3.4

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 (264) hide show
  1. package/README.md +15 -5
  2. package/es/Breadcrumb/index.d.ts +1 -0
  3. package/es/Button/index.js +3 -2
  4. package/es/Button/style/index.less +135 -126
  5. package/es/Button/style/variables.less +53 -53
  6. package/es/Card/index.d.ts +3 -0
  7. package/es/Card/index.js +3 -0
  8. package/es/Card/style/index.d.ts +2 -0
  9. package/es/Card/style/index.js +2 -0
  10. package/es/Card/style/index.less +1 -0
  11. package/es/Checkbox/index.d.ts +1 -0
  12. package/es/ConfigProvider/defaultRenderEmpty.d.ts +4 -0
  13. package/es/ConfigProvider/defaultRenderEmpty.js +37 -0
  14. package/es/ConfigProvider/sizeContext.d.ts +9 -0
  15. package/es/ConfigProvider/sizeContext.js +12 -0
  16. package/es/Dropdown/Button.js +4 -3
  17. package/es/Empty/image/Authority.d.ts +1 -0
  18. package/es/Empty/image/Dataspace.d.ts +1 -0
  19. package/es/Empty/image/Search.d.ts +1 -0
  20. package/es/Empty/image/Simple.d.ts +1 -0
  21. package/es/Empty/image/Worksheet.d.ts +1 -0
  22. package/es/Empty/image/empty.d.ts +1 -0
  23. package/es/Icon/icons/CheckLine.d.ts +13 -0
  24. package/es/Icon/icons/CheckLine.js +73 -0
  25. package/es/Icon/icons.json +410 -0
  26. package/es/Input/components/Group/index.d.ts +3 -1
  27. package/es/Input/components/Group/index.js +6 -12
  28. package/es/Input/components/Input/index.d.ts +3 -2
  29. package/es/Input/components/Input/index.js +11 -23
  30. package/es/Input/components/Password/index.js +11 -16
  31. package/es/Input/components/TextArea/index.d.ts +8 -1
  32. package/es/Input/components/TextArea/index.js +8 -1
  33. package/es/Input/style/index.less +180 -102
  34. package/es/InputNumber/index.d.ts +1 -0
  35. package/es/InputNumber/style/index.less +69 -69
  36. package/es/Menu/Divider.d.ts +1 -0
  37. package/es/Modal/index.js +20 -16
  38. package/es/Modal/locale.d.ts +7 -0
  39. package/es/Modal/locale.js +20 -0
  40. package/es/Modal/style/index.less +48 -45
  41. package/es/Navigator/components/Header/index.d.ts +1 -0
  42. package/es/Navigator/components/Menu/index.d.ts +1 -0
  43. package/es/Navigator/components/MenuItem/index.d.ts +1 -1
  44. package/es/Navigator/index.d.ts +1 -1
  45. package/es/PageHeader/index.d.ts +3 -0
  46. package/es/PageHeader/index.js +3 -0
  47. package/es/PageHeader/style/index.d.ts +2 -0
  48. package/es/PageHeader/style/index.js +2 -0
  49. package/es/PageHeader/style/index.less +1 -0
  50. package/es/Popover/index.d.ts +1 -0
  51. package/es/Radio/components/Group/index.d.ts +6 -0
  52. package/es/Radio/components/Group/index.js +72 -0
  53. package/es/Radio/components/Radio/index.d.ts +3 -0
  54. package/es/Radio/components/Radio/index.js +95 -0
  55. package/es/Radio/index.d.ts +9 -2
  56. package/es/Radio/index.js +5 -3
  57. package/es/Radio/interface/radio.d.ts +24 -0
  58. package/es/Radio/interface/radio.js +1 -0
  59. package/es/Radio/interface/radioGroup.d.ts +42 -0
  60. package/es/Radio/interface/radioGroup.js +1 -0
  61. package/es/Radio/style/index.less +348 -0
  62. package/es/Select/index.js +1 -1
  63. package/es/Select/rc-select/OptionList.js +4 -4
  64. package/es/Select/rc-select/Selector/MultipleSelector.js +11 -1
  65. package/es/Select/rc-select/hooks/useOptions.d.ts +1 -1
  66. package/es/Select/style/index.less +70 -45
  67. package/es/Select/style/variables.less +45 -45
  68. package/es/Select/utils/iconUtil.d.ts +2 -2
  69. package/es/Select/utils/iconUtil.js +9 -5
  70. package/es/Steps/components/ProcessIcon/index.d.ts +6 -0
  71. package/es/Steps/components/ProcessIcon/index.js +8 -0
  72. package/es/Steps/components/Step/index.d.ts +20 -0
  73. package/es/Steps/components/Step/index.js +45 -0
  74. package/es/Steps/index.d.ts +36 -2
  75. package/es/Steps/index.js +30 -1
  76. package/es/Steps/matchMedia.mock.d.ts +1 -0
  77. package/es/Steps/matchMedia.mock.js +17 -0
  78. package/es/Steps/style/index.less +251 -0
  79. package/es/Switch/index.d.ts +46 -2
  80. package/es/Switch/index.js +71 -1
  81. package/es/Switch/style/index.less +129 -0
  82. package/es/Table/Table.d.ts +2 -1
  83. package/es/Table/Table.js +223 -330
  84. package/es/Table/components/Empty/index.d.ts +3 -0
  85. package/es/Table/components/Empty/index.js +17 -0
  86. package/es/Table/components/Loading/index.d.ts +3 -0
  87. package/es/Table/components/Loading/index.js +19 -0
  88. package/es/Table/components/TableBodyRowList/index.d.ts +13 -0
  89. package/es/Table/components/TableBodyRowList/index.js +89 -0
  90. package/es/Table/components/TableHead/index.d.ts +23 -0
  91. package/es/Table/components/TableHead/index.js +262 -0
  92. package/es/Table/constant.d.ts +1 -0
  93. package/es/Table/constant.js +1 -0
  94. package/es/Table/hooks/useFrame.d.ts +7 -0
  95. package/es/Table/hooks/useFrame.js +90 -0
  96. package/es/Table/hooks/useTableColumn.d.ts +28 -0
  97. package/es/Table/hooks/useTableColumn.js +53 -0
  98. package/es/Table/interface.d.ts +3 -2
  99. package/es/Table/style/index.less +33 -30
  100. package/es/Table/utils.d.ts +15 -0
  101. package/es/Table/utils.js +131 -0
  102. package/es/Tabs/index.js +7 -9
  103. package/es/Tabs/style/index.less +57 -25
  104. package/es/_utils/hooks/useId.d.ts +4 -0
  105. package/es/_utils/hooks/useId.js +23 -0
  106. package/es/index.d.ts +9 -5
  107. package/es/index.js +3 -1
  108. package/es/locale/default.d.ts +2 -0
  109. package/es/locale/default.js +2 -0
  110. package/es/locale/en_US.d.ts +3 -0
  111. package/es/locale/en_US.js +132 -0
  112. package/es/locale/zh_CN.d.ts +3 -2
  113. package/es/locale/zh_CN.js +131 -2
  114. package/es/locale-provider/LocaleReceiver.d.ts +4 -0
  115. package/es/locale-provider/LocaleReceiver.js +3 -0
  116. package/es/locale-provider/context.d.ts +7 -0
  117. package/es/locale-provider/context.js +3 -0
  118. package/es/locale-provider/default.d.ts +2 -0
  119. package/es/locale-provider/default.js +2 -0
  120. package/es/locale-provider/en_US.d.ts +2 -0
  121. package/es/locale-provider/en_US.js +2 -0
  122. package/es/locale-provider/index.d.ts +65 -0
  123. package/es/locale-provider/index.js +102 -0
  124. package/es/locale-provider/style/index.d.ts +1 -0
  125. package/es/locale-provider/style/index.js +1 -0
  126. package/es/locale-provider/style/index.less +2 -0
  127. package/es/locale-provider/zh_CN.d.ts +2 -0
  128. package/es/locale-provider/zh_CN.js +2 -0
  129. package/es/style/index.d.ts +0 -1
  130. package/es/style/index.js +0 -1
  131. package/es/style/index.less +2 -2
  132. package/es/style/themes/default/index.less +30 -30
  133. package/lib/Breadcrumb/index.d.ts +1 -0
  134. package/lib/Button/index.js +5 -3
  135. package/lib/Button/style/index.less +135 -126
  136. package/lib/Button/style/variables.less +53 -53
  137. package/lib/Card/index.d.ts +3 -0
  138. package/lib/Card/index.js +15 -0
  139. package/lib/Card/style/index.d.ts +2 -0
  140. package/lib/Card/style/index.js +5 -0
  141. package/lib/Card/style/index.less +1 -0
  142. package/lib/Checkbox/index.d.ts +1 -0
  143. package/lib/ConfigProvider/defaultRenderEmpty.d.ts +4 -0
  144. package/lib/ConfigProvider/defaultRenderEmpty.js +55 -0
  145. package/lib/ConfigProvider/sizeContext.d.ts +9 -0
  146. package/lib/ConfigProvider/sizeContext.js +30 -0
  147. package/lib/Dropdown/Button.js +8 -6
  148. package/lib/Empty/image/Authority.d.ts +1 -0
  149. package/lib/Empty/image/Dataspace.d.ts +1 -0
  150. package/lib/Empty/image/Search.d.ts +1 -0
  151. package/lib/Empty/image/Simple.d.ts +1 -0
  152. package/lib/Empty/image/Worksheet.d.ts +1 -0
  153. package/lib/Empty/image/empty.d.ts +1 -0
  154. package/lib/Icon/icons/CheckLine.d.ts +13 -0
  155. package/lib/Icon/icons/CheckLine.js +90 -0
  156. package/lib/Icon/icons.json +410 -0
  157. package/lib/Input/components/Group/index.d.ts +3 -1
  158. package/lib/Input/components/Group/index.js +7 -12
  159. package/lib/Input/components/Input/index.d.ts +3 -2
  160. package/lib/Input/components/Input/index.js +13 -23
  161. package/lib/Input/components/Password/index.js +13 -17
  162. package/lib/Input/components/TextArea/index.d.ts +8 -1
  163. package/lib/Input/components/TextArea/index.js +10 -1
  164. package/lib/Input/style/index.less +180 -102
  165. package/lib/InputNumber/index.d.ts +1 -0
  166. package/lib/InputNumber/style/index.less +69 -69
  167. package/lib/Menu/Divider.d.ts +1 -0
  168. package/lib/Modal/index.js +25 -18
  169. package/lib/Modal/locale.d.ts +7 -0
  170. package/lib/Modal/locale.js +31 -0
  171. package/lib/Modal/style/index.less +48 -45
  172. package/lib/Navigator/components/Header/index.d.ts +1 -0
  173. package/lib/Navigator/components/Menu/index.d.ts +1 -0
  174. package/lib/Navigator/components/MenuItem/index.d.ts +1 -1
  175. package/lib/Navigator/index.d.ts +1 -1
  176. package/lib/PageHeader/index.d.ts +3 -0
  177. package/lib/PageHeader/index.js +15 -0
  178. package/lib/PageHeader/style/index.d.ts +2 -0
  179. package/lib/PageHeader/style/index.js +5 -0
  180. package/lib/PageHeader/style/index.less +1 -0
  181. package/lib/Popover/index.d.ts +1 -0
  182. package/lib/Radio/components/Group/index.d.ts +6 -0
  183. package/lib/Radio/components/Group/index.js +93 -0
  184. package/lib/Radio/components/Radio/index.d.ts +3 -0
  185. package/lib/Radio/components/Radio/index.js +115 -0
  186. package/lib/Radio/index.d.ts +9 -2
  187. package/lib/Radio/index.js +5 -3
  188. package/lib/Radio/interface/radio.d.ts +24 -0
  189. package/lib/Radio/interface/radio.js +5 -0
  190. package/lib/Radio/interface/radioGroup.d.ts +42 -0
  191. package/lib/Radio/interface/radioGroup.js +5 -0
  192. package/lib/Radio/style/index.less +348 -0
  193. package/lib/Select/index.js +1 -1
  194. package/lib/Select/rc-select/OptionList.js +8 -7
  195. package/lib/Select/rc-select/Selector/MultipleSelector.js +11 -1
  196. package/lib/Select/rc-select/hooks/useOptions.d.ts +1 -1
  197. package/lib/Select/style/index.less +70 -45
  198. package/lib/Select/style/variables.less +45 -45
  199. package/lib/Select/utils/iconUtil.d.ts +2 -2
  200. package/lib/Select/utils/iconUtil.js +13 -7
  201. package/lib/Steps/components/ProcessIcon/index.d.ts +6 -0
  202. package/lib/Steps/components/ProcessIcon/index.js +19 -0
  203. package/lib/Steps/components/Step/index.d.ts +20 -0
  204. package/lib/Steps/components/Step/index.js +61 -0
  205. package/lib/Steps/index.d.ts +36 -2
  206. package/lib/Steps/index.js +34 -1
  207. package/lib/Steps/matchMedia.mock.d.ts +1 -0
  208. package/lib/Steps/matchMedia.mock.js +17 -0
  209. package/lib/Steps/style/index.less +251 -0
  210. package/lib/Switch/index.d.ts +46 -2
  211. package/lib/Switch/index.js +78 -1
  212. package/lib/Switch/style/index.less +129 -0
  213. package/lib/Table/Table.d.ts +2 -1
  214. package/lib/Table/Table.js +228 -332
  215. package/lib/Table/components/Empty/index.d.ts +3 -0
  216. package/lib/Table/components/Empty/index.js +30 -0
  217. package/lib/Table/components/Loading/index.d.ts +3 -0
  218. package/lib/Table/components/Loading/index.js +33 -0
  219. package/lib/Table/components/TableBodyRowList/index.d.ts +13 -0
  220. package/lib/Table/components/TableBodyRowList/index.js +108 -0
  221. package/lib/Table/components/TableHead/index.d.ts +23 -0
  222. package/lib/Table/components/TableHead/index.js +286 -0
  223. package/lib/Table/constant.d.ts +1 -0
  224. package/lib/Table/constant.js +1 -0
  225. package/lib/Table/hooks/useFrame.d.ts +7 -0
  226. package/lib/Table/hooks/useFrame.js +98 -0
  227. package/lib/Table/hooks/useTableColumn.d.ts +28 -0
  228. package/lib/Table/hooks/useTableColumn.js +66 -0
  229. package/lib/Table/interface.d.ts +3 -2
  230. package/lib/Table/style/index.less +33 -30
  231. package/lib/Table/utils.d.ts +15 -0
  232. package/lib/Table/utils.js +147 -0
  233. package/lib/Tabs/index.js +9 -11
  234. package/lib/Tabs/style/index.less +57 -25
  235. package/lib/_utils/hooks/useId.d.ts +4 -0
  236. package/lib/_utils/hooks/useId.js +36 -0
  237. package/lib/index.d.ts +9 -5
  238. package/lib/index.js +16 -0
  239. package/lib/locale/default.d.ts +2 -0
  240. package/lib/locale/default.js +13 -0
  241. package/lib/locale/en_US.d.ts +3 -0
  242. package/lib/locale/en_US.js +146 -0
  243. package/lib/locale/zh_CN.d.ts +3 -2
  244. package/lib/locale/zh_CN.js +134 -2
  245. package/lib/locale-provider/LocaleReceiver.d.ts +4 -0
  246. package/lib/locale-provider/LocaleReceiver.js +23 -0
  247. package/lib/locale-provider/context.d.ts +7 -0
  248. package/lib/locale-provider/context.js +12 -0
  249. package/lib/locale-provider/default.d.ts +2 -0
  250. package/lib/locale-provider/default.js +13 -0
  251. package/lib/locale-provider/en_US.d.ts +2 -0
  252. package/lib/locale-provider/en_US.js +13 -0
  253. package/lib/locale-provider/index.d.ts +65 -0
  254. package/lib/locale-provider/index.js +116 -0
  255. package/lib/locale-provider/style/index.d.ts +1 -0
  256. package/lib/locale-provider/style/index.js +3 -0
  257. package/lib/locale-provider/style/index.less +2 -0
  258. package/lib/locale-provider/zh_CN.d.ts +2 -0
  259. package/lib/locale-provider/zh_CN.js +13 -0
  260. package/lib/style/index.d.ts +0 -1
  261. package/lib/style/index.js +0 -2
  262. package/lib/style/index.less +2 -2
  263. package/lib/style/themes/default/index.less +30 -30
  264. package/package.json +11 -8
@@ -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,93 +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;
145
+ }
146
+ }
147
+
148
+ &.ant-select-show-arrow {
149
+ .ant-select-selector {
150
+ padding-right: @selector-padding-horizontal-large + @selector-font-size-large;
144
151
  }
145
152
  }
146
153
  }
147
154
 
148
155
  &.ald-select-middle {
149
- font-size: @selector-fontSize-middle;
156
+ font-size: @selector-font-size-middle;
150
157
 
151
158
  .ant-select-selector {
152
159
  align-items: center;
153
160
  height: @selector-height-middle;
154
- padding: 0 @selector-paddingHorizontal-middle;
155
- line-height: @selector-lineHeight-middle;
156
- 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;
157
164
 
158
165
  .ald-select-selector-prefix {
159
166
  display: flex;
160
167
  align-items: center;
161
- margin-right: @prefix-marginRight-middle;
168
+ margin-right: @prefix-margin-right-middle;
162
169
  }
163
170
 
164
171
  .ant-select-selection-item,
165
172
  .ant-select-selection-placeholder {
166
- line-height: @selector-lineHeight-middle;
173
+ line-height: @selector-line-height-middle;
174
+ }
175
+ }
176
+
177
+ &.ant-select-show-arrow {
178
+ .ant-select-selector {
179
+ padding-right: @selector-padding-horizontal-middle + @selector-font-size-middle;
167
180
  }
168
181
  }
169
182
  }
170
183
 
171
184
  &.ald-select-small {
172
- font-size: @selector-fontSize-small;
185
+ font-size: @selector-font-size-small;
173
186
 
174
187
  .ant-select-selector {
175
188
  align-items: center;
176
189
  height: @selector-height-small;
177
- padding: 0 @selector-paddingHorizontal-small;
178
- line-height: @selector-lineHeight-small;
179
- 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;
180
193
 
181
194
  .ald-select-selector-prefix {
182
195
  display: flex;
183
196
  align-items: center;
184
- margin-right: @prefix-marginRight-small;
197
+ margin-right: @prefix-margin-right-small;
185
198
  }
186
199
 
187
200
  .ant-select-selection-item,
188
201
  .ant-select-selection-placeholder {
189
- line-height: @selector-lineHeight-small;
202
+ line-height: @selector-line-height-small;
203
+ }
204
+ }
205
+
206
+ &.ant-select-show-arrow {
207
+ .ant-select-selector {
208
+ padding-right: @selector-padding-horizontal-small + @selector-font-size-small;
190
209
  }
191
210
  }
192
211
  }
193
212
 
194
213
  &.ald-select-mini {
195
- font-size: @selector-fontSize-mini;
214
+ font-size: @selector-font-size-mini;
196
215
 
197
216
  .ant-select-selector {
198
217
  align-items: center;
199
218
  height: @selector-height-mini;
200
- padding: 0 @selector-paddingHorizontal-mini;
201
- line-height: @selector-lineHeight-mini;
202
- 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;
203
222
 
204
223
  .ald-select-selector-prefix {
205
224
  display: flex;
206
225
  align-items: center;
207
- margin-right: @prefix-marginRight-mini;
226
+ margin-right: @prefix-margin-right-mini;
208
227
  }
209
228
 
210
229
  .ant-select-selection-item,
211
230
  .ant-select-selection-placeholder {
212
- line-height: @selector-lineHeight-mini;
231
+ line-height: @selector-line-height-mini;
232
+ }
233
+ }
234
+
235
+ &.ant-select-show-arrow {
236
+ .ant-select-selector {
237
+ padding-right: @selector-padding-horizontal-mini + @selector-font-size-mini;
213
238
  }
214
239
  }
215
240
  }
@@ -278,11 +303,11 @@
278
303
  margin: 0 4px;
279
304
  padding: 0;
280
305
  font-size: 14px;
281
- background-color: @select-option-bgColor;
306
+ background-color: @select-option-bg-color;
282
307
  border-radius: 6px;
283
308
 
284
309
  &:hover {
285
- background-color: @select-option-bgColor-hover;
310
+ background-color: @select-option-bg-color-hover;
286
311
  }
287
312
 
288
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: {} | null;
22
- removeIcon: {} | 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,8 +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 Icon from '../../Icon';
9
+ import Color from '../../style/themes/default/themeColor.module.less';
6
10
  export default function getIcons(_ref) {
7
11
  var suffixIcon = _ref.suffixIcon,
8
12
  clearIcon = _ref.clearIcon,
@@ -44,8 +48,8 @@ export default function getIcons(_ref) {
44
48
  // if (open && showSearch) {
45
49
  // return getSuffixIconNode(<SearchOutlined className={iconCls} />);
46
50
  // }
47
- return getSuffixIconNode( /*#__PURE__*/React.createElement(Icon, {
48
- type: "arrows-down-line",
51
+ return getSuffixIconNode( /*#__PURE__*/React.createElement(_ArrowsDownLine, {
52
+ color: Color.NL50,
49
53
  className: iconCls
50
54
  }));
51
55
  };
@@ -67,8 +71,8 @@ export default function getIcons(_ref) {
67
71
  if (removeIcon !== undefined) {
68
72
  mergedRemoveIcon = removeIcon;
69
73
  } else {
70
- mergedRemoveIcon = /*#__PURE__*/React.createElement(Icon, {
71
- type: 'close',
74
+ mergedRemoveIcon = /*#__PURE__*/React.createElement(_CancelFill, {
75
+ color: Color.NL50,
72
76
  size: '1em'
73
77
  });
74
78
  }
@@ -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
+ });