@aloudata/aloudata-design 0.3.2 → 0.3.3

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 (89) hide show
  1. package/es/Button/index.js +3 -2
  2. package/es/Button/style/index.less +135 -126
  3. package/es/Button/style/variables.less +53 -53
  4. package/es/Dropdown/Button.js +3 -2
  5. package/es/Icon/icons.json +410 -0
  6. package/es/Input/components/Group/index.d.ts +2 -1
  7. package/es/Input/components/Group/index.js +6 -12
  8. package/es/Input/components/Input/index.d.ts +3 -2
  9. package/es/Input/components/Input/index.js +11 -22
  10. package/es/Input/components/Password/index.js +11 -16
  11. package/es/Input/style/index.less +102 -102
  12. package/es/InputNumber/style/index.less +69 -69
  13. package/es/Modal/index.js +4 -7
  14. package/es/Modal/style/index.less +45 -45
  15. package/es/PageHeader/index.d.ts +3 -0
  16. package/es/PageHeader/index.js +3 -0
  17. package/es/PageHeader/style/index.d.ts +2 -0
  18. package/es/PageHeader/style/index.js +2 -0
  19. package/es/PageHeader/style/index.less +1 -0
  20. package/es/Select/rc-select/OptionList.js +3 -2
  21. package/es/Select/rc-select/hooks/useOptions.d.ts +1 -1
  22. package/es/Select/style/index.less +49 -49
  23. package/es/Select/style/variables.less +45 -45
  24. package/es/Select/utils/iconUtil.d.ts +2 -2
  25. package/es/Select/utils/iconUtil.js +6 -4
  26. package/es/Steps/components/ProcessIcon/index.d.ts +5 -0
  27. package/es/Steps/components/ProcessIcon/index.js +8 -0
  28. package/es/Steps/components/Step/index.d.ts +20 -0
  29. package/es/Steps/components/Step/index.js +45 -0
  30. package/es/Steps/index.d.ts +36 -2
  31. package/es/Steps/index.js +30 -1
  32. package/es/Steps/matchMedia.mock.d.ts +1 -0
  33. package/es/Steps/matchMedia.mock.js +17 -0
  34. package/es/Steps/style/index.less +251 -0
  35. package/es/Switch/index.d.ts +46 -2
  36. package/es/Switch/index.js +71 -1
  37. package/es/Switch/style/index.less +129 -0
  38. package/es/Table/style/index.less +1 -1
  39. package/es/Tabs/index.js +3 -2
  40. package/es/Tabs/style/index.less +25 -25
  41. package/es/index.d.ts +6 -4
  42. package/es/index.js +2 -1
  43. package/es/style/index.less +1 -1
  44. package/es/style/themes/default/index.less +30 -30
  45. package/lib/Button/index.js +5 -3
  46. package/lib/Button/style/index.less +135 -126
  47. package/lib/Button/style/variables.less +53 -53
  48. package/lib/Dropdown/Button.js +7 -5
  49. package/lib/Icon/icons.json +410 -0
  50. package/lib/Input/components/Group/index.d.ts +2 -1
  51. package/lib/Input/components/Group/index.js +7 -12
  52. package/lib/Input/components/Input/index.d.ts +3 -2
  53. package/lib/Input/components/Input/index.js +13 -22
  54. package/lib/Input/components/Password/index.js +13 -17
  55. package/lib/Input/style/index.less +102 -102
  56. package/lib/InputNumber/style/index.less +69 -69
  57. package/lib/Modal/index.js +8 -10
  58. package/lib/Modal/style/index.less +45 -45
  59. package/lib/PageHeader/index.d.ts +3 -0
  60. package/lib/PageHeader/index.js +15 -0
  61. package/lib/PageHeader/style/index.d.ts +2 -0
  62. package/lib/PageHeader/style/index.js +5 -0
  63. package/lib/PageHeader/style/index.less +1 -0
  64. package/lib/Select/rc-select/OptionList.js +7 -5
  65. package/lib/Select/rc-select/hooks/useOptions.d.ts +1 -1
  66. package/lib/Select/style/index.less +49 -49
  67. package/lib/Select/style/variables.less +45 -45
  68. package/lib/Select/utils/iconUtil.d.ts +2 -2
  69. package/lib/Select/utils/iconUtil.js +10 -8
  70. package/lib/Steps/components/ProcessIcon/index.d.ts +5 -0
  71. package/lib/Steps/components/ProcessIcon/index.js +19 -0
  72. package/lib/Steps/components/Step/index.d.ts +20 -0
  73. package/lib/Steps/components/Step/index.js +61 -0
  74. package/lib/Steps/index.d.ts +36 -2
  75. package/lib/Steps/index.js +34 -1
  76. package/lib/Steps/matchMedia.mock.d.ts +1 -0
  77. package/lib/Steps/matchMedia.mock.js +17 -0
  78. package/lib/Steps/style/index.less +251 -0
  79. package/lib/Switch/index.d.ts +46 -2
  80. package/lib/Switch/index.js +78 -1
  81. package/lib/Switch/style/index.less +129 -0
  82. package/lib/Table/style/index.less +1 -1
  83. package/lib/Tabs/index.js +5 -3
  84. package/lib/Tabs/style/index.less +25 -25
  85. package/lib/index.d.ts +6 -4
  86. package/lib/index.js +8 -0
  87. package/lib/style/index.less +1 -1
  88. package/lib/style/themes/default/index.less +30 -30
  89. package/package.json +2 -1
@@ -0,0 +1,410 @@
1
+ [
2
+ {
3
+ "id": 0,
4
+ "title": "加载中",
5
+ "name": "loading-line",
6
+ "category": "Line",
7
+ "categoryCN": "线",
8
+ "author": "阿广"
9
+ },
10
+ {
11
+ "id": 1,
12
+ "title": "全部",
13
+ "name": "all-line",
14
+ "category": "Line",
15
+ "categoryCN": "线",
16
+ "author": "阿广"
17
+ },
18
+ {
19
+ "id": 2,
20
+ "title": "至底",
21
+ "name": "to-bottom-line",
22
+ "category": "Line",
23
+ "categoryCN": "线",
24
+ "author": "阿广"
25
+ },
26
+ {
27
+ "id": 3,
28
+ "title": "闪电",
29
+ "name": "lightning-line",
30
+ "category": "Line",
31
+ "categoryCN": "线",
32
+ "author": "阿广"
33
+ },
34
+ {
35
+ "id": 4,
36
+ "title": "复制",
37
+ "name": "copy-line",
38
+ "category": "Line",
39
+ "categoryCN": "线",
40
+ "author": "阿广"
41
+ },
42
+ {
43
+ "id": 5,
44
+ "title": "标签",
45
+ "name": "hashtag-line",
46
+ "category": "Line",
47
+ "categoryCN": "线",
48
+ "author": "阿广"
49
+ },
50
+ {
51
+ "id": 6,
52
+ "title": "日历",
53
+ "name": "calendar-line",
54
+ "category": "Line",
55
+ "categoryCN": "线",
56
+ "author": "阿广"
57
+ },
58
+ {
59
+ "id": 7,
60
+ "title": "至顶",
61
+ "name": "to-top-line",
62
+ "category": "Line",
63
+ "categoryCN": "线",
64
+ "author": "阿广"
65
+ },
66
+ {
67
+ "id": 8,
68
+ "title": "最大化",
69
+ "name": "maximize-line",
70
+ "category": "Line",
71
+ "categoryCN": "线",
72
+ "author": "阿广"
73
+ },
74
+ {
75
+ "id": 9,
76
+ "title": "等待中_圆形",
77
+ "name": "waiting-line",
78
+ "category": "Line",
79
+ "categoryCN": "线",
80
+ "author": "阿广"
81
+ },
82
+ {
83
+ "id": 10,
84
+ "title": "收缩",
85
+ "name": "shrink-line",
86
+ "category": "Line",
87
+ "categoryCN": "线",
88
+ "author": "阿广"
89
+ },
90
+ {
91
+ "id": 11,
92
+ "title": "明细",
93
+ "name": "lists-line",
94
+ "category": "Line",
95
+ "categoryCN": "线",
96
+ "author": "阿广"
97
+ },
98
+ {
99
+ "id": 12,
100
+ "title": "正确_圆形",
101
+ "name": "check-circle-line",
102
+ "category": "Line",
103
+ "categoryCN": "线",
104
+ "author": "阿广"
105
+ },
106
+ {
107
+ "id": 13,
108
+ "title": "错误_圆形",
109
+ "name": "error-circle-line",
110
+ "category": "Line",
111
+ "categoryCN": "线",
112
+ "author": "阿广"
113
+ },
114
+ {
115
+ "id": 14,
116
+ "title": "右箭头_小号",
117
+ "name": "arrows-right-sm-line",
118
+ "category": "Line",
119
+ "categoryCN": "线",
120
+ "author": "阿广"
121
+ },
122
+ {
123
+ "id": 15,
124
+ "title": "优化",
125
+ "name": "optimize-line",
126
+ "category": "Line",
127
+ "categoryCN": "线",
128
+ "author": "阿广"
129
+ },
130
+ {
131
+ "id": 16,
132
+ "title": "文本",
133
+ "name": "text-line",
134
+ "category": "Line",
135
+ "categoryCN": "线",
136
+ "author": "阿广"
137
+ },
138
+ {
139
+ "id": 17,
140
+ "title": "用户_圆形",
141
+ "name": "user-circle-line",
142
+ "category": "Line",
143
+ "categoryCN": "线",
144
+ "author": "阿广"
145
+ },
146
+ {
147
+ "id": 18,
148
+ "title": "智能_模板",
149
+ "name": "ai-template-line",
150
+ "category": "Line",
151
+ "categoryCN": "线",
152
+ "author": "阿广"
153
+ },
154
+ {
155
+ "id": 19,
156
+ "title": "添加",
157
+ "name": "add-line",
158
+ "category": "Line",
159
+ "categoryCN": "线",
160
+ "author": "阿广"
161
+ },
162
+ {
163
+ "id": 20,
164
+ "title": "智能_明细",
165
+ "name": "ai-lists-line",
166
+ "category": "Line",
167
+ "categoryCN": "线",
168
+ "author": "阿广"
169
+ },
170
+ {
171
+ "id": 21,
172
+ "title": "check",
173
+ "name": "check-line",
174
+ "category": "Line",
175
+ "categoryCN": "线",
176
+ "author": "阿广"
177
+ },
178
+ {
179
+ "id": 22,
180
+ "title": "聚合",
181
+ "name": "column-line",
182
+ "category": "Line",
183
+ "categoryCN": "线",
184
+ "author": "阿广"
185
+ },
186
+ {
187
+ "id": 23,
188
+ "title": "新窗口",
189
+ "name": "new-windows-line",
190
+ "category": "Line",
191
+ "categoryCN": "线",
192
+ "author": "阿广"
193
+ },
194
+ {
195
+ "id": 24,
196
+ "title": "智能_聚合",
197
+ "name": "ai-column-line",
198
+ "category": "Line",
199
+ "categoryCN": "线",
200
+ "author": "阿广"
201
+ },
202
+ {
203
+ "id": 25,
204
+ "title": "文章",
205
+ "name": "article-fill",
206
+ "category": "Fill",
207
+ "categoryCN": "填充",
208
+ "author": "阿广"
209
+ },
210
+ {
211
+ "id": 26,
212
+ "title": "存储",
213
+ "name": "storage-fill",
214
+ "category": "Fill",
215
+ "categoryCN": "填充",
216
+ "author": "阿广"
217
+ },
218
+ {
219
+ "id": 27,
220
+ "title": "点",
221
+ "name": "dot-fill",
222
+ "category": "Fill",
223
+ "categoryCN": "填充",
224
+ "author": "阿广"
225
+ },
226
+ {
227
+ "id": 28,
228
+ "title": "信息",
229
+ "name": "info-fill",
230
+ "category": "Fill",
231
+ "categoryCN": "填充",
232
+ "author": "阿广"
233
+ },
234
+ {
235
+ "id": 29,
236
+ "title": "闪电",
237
+ "name": "lightning-fill",
238
+ "category": "Fill",
239
+ "categoryCN": "填充",
240
+ "author": "阿广"
241
+ },
242
+ {
243
+ "id": 30,
244
+ "title": "文件夹_打开",
245
+ "name": "folder-open-fill",
246
+ "category": "Fill",
247
+ "categoryCN": "填充",
248
+ "author": "阿广"
249
+ },
250
+ {
251
+ "id": 31,
252
+ "title": "文件夹",
253
+ "name": "folder-fill",
254
+ "category": "Fill",
255
+ "categoryCN": "填充",
256
+ "author": "阿广"
257
+ },
258
+ {
259
+ "id": 32,
260
+ "title": "箭头_向下",
261
+ "name": "arrows-down-line",
262
+ "category": "Line",
263
+ "categoryCN": "线",
264
+ "author": "阿广"
265
+ },
266
+ {
267
+ "id": 33,
268
+ "title": "取消",
269
+ "name": "cancel-fill",
270
+ "category": "Fill",
271
+ "categoryCN": "填充",
272
+ "author": "阿广"
273
+ },
274
+ {
275
+ "id": 34,
276
+ "title": "关闭",
277
+ "name": "close-line",
278
+ "category": "Line",
279
+ "categoryCN": "线",
280
+ "author": "阿广"
281
+ },
282
+ {
283
+ "id": 35,
284
+ "title": "删除",
285
+ "name": "delete-line",
286
+ "category": "Line",
287
+ "categoryCN": "线",
288
+ "author": "阿广"
289
+ },
290
+ {
291
+ "id": 36,
292
+ "title": "下载",
293
+ "name": "download-line",
294
+ "category": "Line",
295
+ "categoryCN": "线",
296
+ "author": "阿广"
297
+ },
298
+ {
299
+ "id": 37,
300
+ "title": "闭眼",
301
+ "name": "eye-off-line",
302
+ "category": "Line",
303
+ "categoryCN": "线",
304
+ "author": "阿广"
305
+ },
306
+ {
307
+ "id": 38,
308
+ "title": "睁眼",
309
+ "name": "eye-on-line",
310
+ "category": "Line",
311
+ "categoryCN": "线",
312
+ "author": "阿广"
313
+ },
314
+ {
315
+ "id": 39,
316
+ "title": "更多",
317
+ "name": "more",
318
+ "category": "Fill",
319
+ "categoryCN": "填充",
320
+ "author": "阿广"
321
+ },
322
+ {
323
+ "id": 40,
324
+ "title": "查询",
325
+ "name": "search-line",
326
+ "category": "Line",
327
+ "categoryCN": "线",
328
+ "author": "阿广"
329
+ },
330
+ {
331
+ "id": 41,
332
+ "title": "升序排列",
333
+ "name": "sort-ascending-line",
334
+ "category": "Line",
335
+ "categoryCN": "线",
336
+ "author": "阿广"
337
+ },
338
+ {
339
+ "id": 42,
340
+ "title": "降序排列",
341
+ "name": "sort-descending-line",
342
+ "category": "Line",
343
+ "categoryCN": "线",
344
+ "author": "阿广"
345
+ },
346
+ {
347
+ "id": 43,
348
+ "title": "check@fill",
349
+ "name": "check-fill",
350
+ "category": "Fill",
351
+ "categoryCN": "填充",
352
+ "author": "阿广"
353
+ },
354
+ {
355
+ "id": 44,
356
+ "title": "数据空间",
357
+ "name": "data-space-line",
358
+ "category": "Line",
359
+ "categoryCN": "线",
360
+ "author": "阿广"
361
+ },
362
+ {
363
+ "id": 45,
364
+ "title": "数据集",
365
+ "name": "dataset-line",
366
+ "category": "Line",
367
+ "categoryCN": "线",
368
+ "author": "阿广"
369
+ },
370
+ {
371
+ "id": 46,
372
+ "title": "文件",
373
+ "name": "file-line",
374
+ "category": "Line",
375
+ "categoryCN": "线",
376
+ "author": "阿广"
377
+ },
378
+ {
379
+ "id": 47,
380
+ "title": "同步刷新",
381
+ "name": "sync-refresh-line",
382
+ "category": "Line",
383
+ "categoryCN": "线",
384
+ "author": "阿广"
385
+ },
386
+ {
387
+ "id": 48,
388
+ "title": "表格",
389
+ "name": "table-line",
390
+ "category": "Line",
391
+ "categoryCN": "线",
392
+ "author": "阿广"
393
+ },
394
+ {
395
+ "id": 49,
396
+ "title": "视图",
397
+ "name": "view-line",
398
+ "category": "Line",
399
+ "categoryCN": "线",
400
+ "author": "阿广"
401
+ },
402
+ {
403
+ "id": 50,
404
+ "title": "错误",
405
+ "name": "error-fill",
406
+ "category": "Fill",
407
+ "categoryCN": "填充",
408
+ "author": "阿广"
409
+ }
410
+ ]
@@ -8,9 +8,10 @@ export interface IGroupProps extends Omit<GroupProps, 'size'> {
8
8
  compact?: boolean;
9
9
  /**
10
10
  * @description Input.Group 中所有的 Input 的大小,可选 large default small
11
- * @type 'mini'|'small' | 'default' | 'large';
11
+ * @type 'mini'|'small' | 'middle' | 'large';
12
12
  * @default default
13
13
  */
14
14
  size?: TSize;
15
+ className?: string;
15
16
  }
16
17
  export default function Group(props: IGroupProps): JSX.Element;
@@ -1,4 +1,4 @@
1
- var _excluded = ["size"];
1
+ var _excluded = ["size", "className"];
2
2
 
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
 
@@ -6,23 +6,17 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
6
6
 
7
7
  import React from 'react';
8
8
  import AntdInput from 'antd/lib/input';
9
+ import { getSizeType } from '../Input';
9
10
  import classnames from 'classnames';
10
11
  var AntdGroup = AntdInput.Group;
11
12
  export default function Group(props) {
12
13
  var _props$size = props.size,
13
- size = _props$size === void 0 ? 'default' : _props$size,
14
+ size = _props$size === void 0 ? 'middle' : _props$size,
15
+ _props$className = props.className,
16
+ className = _props$className === void 0 ? '' : _props$className,
14
17
  rest = _objectWithoutProperties(props, _excluded);
15
18
 
16
- var getClassName = function getClassName(groupSize) {
17
- return classnames('ald-input-group', {
18
- 'ald-input-group-large': groupSize === 'large',
19
- 'ald-input-group-small': groupSize === 'small',
20
- 'ald-input-group-mini': groupSize === 'mini',
21
- 'ald-input-group-middle': !['mini', 'small', 'large'].includes(groupSize)
22
- });
23
- };
24
-
25
19
  return /*#__PURE__*/React.createElement(AntdGroup, Object.assign({
26
- className: getClassName(size)
20
+ className: classnames("ald-input-group-".concat(getSizeType(size)), className)
27
21
  }, rest));
28
22
  }
@@ -7,14 +7,14 @@ interface IShowCountProps {
7
7
  maxLength?: number;
8
8
  }) => string;
9
9
  }
10
- export declare type TSize = 'mini' | 'small' | 'default' | 'large';
10
+ export declare type TSize = 'mini' | 'small' | 'middle' | 'large';
11
11
  export type { InputRef };
12
12
  declare type ChangeEventHandler = (e: React.ChangeEvent<HTMLInputElement>) => void;
13
13
  export interface IInputProps extends Omit<InputProps, 'size' | 'id' | 'prefix' | 'allowClear' | 'disabled' | 'showCount' | 'maxLength' | 'value' | 'defaultValue' | 'onPressEnter' | 'onChange'> {
14
14
  /**
15
15
  * @description 输入框尺寸
16
16
  * @default default
17
- * @type 'small' | 'default' | 'large';
17
+ * @type 'mini' | 'small' | 'middle' | 'large';
18
18
  */
19
19
  size?: TSize;
20
20
  /**
@@ -63,5 +63,6 @@ export interface IInputProps extends Omit<InputProps, 'size' | 'id' | 'prefix' |
63
63
  */
64
64
  onChange?: ChangeEventHandler;
65
65
  }
66
+ export declare function getSizeType(sizeType: TSize): TSize;
66
67
  declare const Input: React.ForwardRefExoticComponent<IInputProps & React.RefAttributes<InputRef>>;
67
68
  export default Input;
@@ -1,4 +1,4 @@
1
- var _excluded = ["size"];
1
+ var _excluded = ["size", "className"];
2
2
 
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
 
@@ -7,35 +7,24 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
7
7
  import React from 'react';
8
8
  import AntdInput from 'antd/lib/input/Input';
9
9
  import classnames from 'classnames';
10
+ export function getSizeType(sizeType) {
11
+ if (['mini', 'small', 'middle', 'large'].includes(sizeType)) {
12
+ return sizeType;
13
+ }
14
+
15
+ return 'middle';
16
+ }
10
17
  var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
11
18
  var _props$size = props.size,
12
- size = _props$size === void 0 ? 'default' : _props$size,
19
+ size = _props$size === void 0 ? 'middle' : _props$size,
20
+ className = props.className,
13
21
  rest = _objectWithoutProperties(props, _excluded);
14
22
 
15
- var getInputSize = function getInputSize(inputSize) {
16
- if (inputSize === 'small' || inputSize === 'large') {
17
- return inputSize;
18
- }
19
-
20
- return 'middle';
21
- };
22
-
23
- var getClassName = function getClassName(inputSize) {
24
- return classnames('ald-input', {
25
- 'ald-input-small': inputSize === 'small',
26
- 'ald-input-large': inputSize === 'large',
27
- 'ald-input-mini': inputSize === 'mini',
28
- 'ald-input-middle': !['small', 'mini', 'large'].includes(inputSize),
29
- 'ald-input-showCount': props.showCount
30
- });
31
- };
32
-
33
23
  return /*#__PURE__*/React.createElement(AntdInput, Object.assign({}, rest, {
34
24
  // @ts-ignore
35
25
  ref: ref,
36
- size: getInputSize(size),
37
26
  bordered: true,
38
- className: getClassName(size),
27
+ className: classnames('ald-input', "ald-input-".concat(getSizeType(size)), className),
39
28
  addonAfter: null,
40
29
  addonBefore: null,
41
30
  suffix: null
@@ -1,36 +1,31 @@
1
- var _excluded = ["size"];
1
+ import "@aloudata/icons-react/styles/index.less";
2
+ import _EyeOffLine from "@aloudata/icons-react/es/icons/EyeOffLine";
3
+ import "@aloudata/icons-react/styles/index.less";
4
+ import _EyeOnLine from "@aloudata/icons-react/es/icons/EyeOnLine";
5
+ var _excluded = ["size", "className"];
2
6
 
3
7
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
8
 
5
9
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
6
10
 
7
11
  import React from 'react';
8
- import EyeOffLine from '../../../Icon/icons/EyeOffLine';
9
- import EyeOnLine from '../../../Icon/icons/EyeOnLine';
10
12
  import AntdPassword from 'antd/lib/input/Password';
13
+ import { getSizeType } from '../Input';
11
14
  import classnames from 'classnames'; // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
15
 
13
16
  export default /*#__PURE__*/React.forwardRef(function (props, ref) {
14
17
  var _props$size = props.size,
15
- size = _props$size === void 0 ? 'default' : _props$size,
18
+ size = _props$size === void 0 ? 'middle' : _props$size,
19
+ className = props.className,
16
20
  restProps = _objectWithoutProperties(props, _excluded);
17
21
 
18
- var getClassName = function getClassName(inputSize) {
19
- return classnames('ald-input', {
20
- 'ald-input-small': inputSize === 'small',
21
- 'ald-input-large': inputSize === 'large',
22
- 'ald-input-mini': inputSize === 'mini',
23
- 'ald-input-middle': !['small', 'mini', 'large'].includes(inputSize)
24
- });
25
- };
26
-
27
22
  return /*#__PURE__*/React.createElement(AntdPassword, Object.assign({}, restProps, {
28
23
  ref: ref,
29
- className: getClassName(size),
24
+ className: classnames('ald-input', "ald-input-".concat(getSizeType(size)), className),
30
25
  iconRender: function iconRender(visible) {
31
- return visible ? /*#__PURE__*/React.createElement(EyeOnLine, {
26
+ return visible ? /*#__PURE__*/React.createElement(_EyeOnLine, {
32
27
  fill: "currentColor"
33
- }) : /*#__PURE__*/React.createElement(EyeOffLine, {
28
+ }) : /*#__PURE__*/React.createElement(_EyeOffLine, {
34
29
  fill: "currentColor"
35
30
  });
36
31
  }