@aloudata/aloudata-design 0.4.0-beta.1 → 0.4.0-beta.10
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.
- package/es/Avatar/component/Avatar/index.d.ts +84 -0
- package/es/Avatar/component/Avatar/index.js +42 -0
- package/es/Avatar/index.d.ts +1 -13
- package/es/Avatar/index.js +1 -30
- package/es/Avatar/style/index.less +1 -1
- package/es/Breadcrumb/index.d.ts +5 -2
- package/es/Breadcrumb/index.js +17 -7
- package/es/Button/index.d.ts +1 -1
- package/es/Button/index.js +3 -8
- package/es/Button/style/index.less +7 -1
- package/es/Button/style/variables.less +26 -26
- package/es/Checkbox/component/CheckboxGroup/index.d.ts +4 -0
- package/es/Checkbox/component/CheckboxGroup/index.js +27 -0
- package/es/Checkbox/index.d.ts +4 -5
- package/es/Checkbox/index.js +3 -12
- package/es/Checkbox/style/index.less +36 -16
- package/es/Checkbox/type.d.ts +94 -0
- package/es/Checkbox/type.js +6 -0
- package/es/Divider/index.d.ts +40 -2
- package/es/Divider/index.js +10 -1
- package/es/Divider/style/index.less +4 -0
- package/es/Divider/style/index.less.d.ts +183 -0
- package/es/Dropdown/Button.d.ts +4 -4
- package/es/Dropdown/Button.js +5 -5
- package/es/Dropdown/index.d.ts +5 -5
- package/es/Dropdown/index.js +5 -5
- package/es/Icon/icons.d.ts +9 -0
- package/es/Icon/icons.js +1590 -0
- package/es/Input/components/Input/index.d.ts +13 -1
- package/es/Input/components/Input/index.js +1 -3
- package/es/Input/components/Password/index.d.ts +6 -1
- package/es/Input/components/Password/index.js +11 -3
- package/es/Input/components/TextArea/index.d.ts +1 -1
- package/es/Input/style/index.less +139 -59
- package/es/InputNumber/index.d.ts +3 -3
- package/es/InputNumber/style/index.less +66 -26
- package/es/InputNumber/type.d.ts +161 -0
- package/es/InputNumber/type.js +1 -0
- package/es/Menu/index.d.ts +2 -0
- package/es/Popconfirm/index.d.ts +3 -0
- package/es/Popconfirm/index.js +2 -0
- package/es/Popconfirm/style/index.d.ts +2 -0
- package/es/Popconfirm/style/index.js +2 -0
- package/es/Popconfirm/style/index.less +1 -0
- package/es/Progress/index.d.ts +3 -0
- package/es/Progress/index.js +2 -0
- package/es/Progress/style/index.d.ts +2 -0
- package/es/Progress/style/index.js +2 -0
- package/es/Progress/style/index.less +1 -0
- package/es/Select/style/variables.less.d.ts +6 -0
- package/es/Steps/style/index.less +10 -4
- package/es/Table/Table.js +51 -29
- package/es/Table/components/TableHead/index.d.ts +0 -1
- package/es/Table/components/TableHead/index.js +1 -2
- package/es/Table/interface.d.ts +2 -0
- package/es/Table/style/index.less +6 -1
- package/es/Table/style/variable.less +0 -5
- package/es/Table/style/variable.less.d.ts +1 -1
- package/es/Table/utils.js +16 -9
- package/es/Tabs/index.js +2 -2
- package/es/Tabs/style/index.less +1 -1
- package/es/Tooltip/index.d.ts +2 -2
- package/es/Tooltip/index.js +4 -4
- package/es/index.d.ts +7 -3
- package/es/index.js +3 -1
- package/es/style/themes/default/scrollBar.less +10 -7
- package/es/style/themes/default/themeColor.module.less +176 -166
- package/es/style/themes/default/themeColor.module.less.d.ts +6 -0
- package/lib/Avatar/component/Avatar/index.d.ts +84 -0
- package/lib/Avatar/component/Avatar/index.js +61 -0
- package/lib/Avatar/index.d.ts +1 -13
- package/lib/Avatar/index.js +3 -44
- package/lib/Avatar/style/index.less +1 -1
- package/lib/Breadcrumb/index.d.ts +5 -2
- package/lib/Breadcrumb/index.js +17 -8
- package/lib/Button/index.d.ts +1 -1
- package/lib/Button/index.js +3 -8
- package/lib/Button/style/index.less +7 -1
- package/lib/Button/style/variables.less +26 -26
- package/lib/Checkbox/component/CheckboxGroup/index.d.ts +4 -0
- package/lib/Checkbox/component/CheckboxGroup/index.js +42 -0
- package/lib/Checkbox/index.d.ts +4 -5
- package/lib/Checkbox/index.js +4 -13
- package/lib/Checkbox/style/index.less +36 -16
- package/lib/Checkbox/type.d.ts +94 -0
- package/lib/Checkbox/type.js +13 -0
- package/lib/Divider/index.d.ts +40 -2
- package/lib/Divider/index.js +11 -1
- package/lib/Divider/style/index.less +4 -0
- package/lib/Divider/style/index.less.d.ts +183 -0
- package/lib/Dropdown/Button.d.ts +4 -4
- package/lib/Dropdown/Button.js +5 -5
- package/lib/Dropdown/index.d.ts +5 -5
- package/lib/Dropdown/index.js +5 -5
- package/lib/Icon/icons.d.ts +9 -0
- package/lib/Icon/icons.js +1597 -0
- package/lib/Input/components/Input/index.d.ts +13 -1
- package/lib/Input/components/Input/index.js +1 -3
- package/lib/Input/components/Password/index.d.ts +6 -1
- package/lib/Input/components/Password/index.js +14 -4
- package/lib/Input/components/TextArea/index.d.ts +1 -1
- package/lib/Input/style/index.less +139 -59
- package/lib/InputNumber/index.d.ts +3 -3
- package/lib/InputNumber/style/index.less +66 -26
- package/lib/InputNumber/type.d.ts +161 -0
- package/lib/InputNumber/type.js +5 -0
- package/lib/Menu/index.d.ts +2 -0
- package/lib/Popconfirm/index.d.ts +3 -0
- package/lib/Popconfirm/index.js +13 -0
- package/lib/Popconfirm/style/index.d.ts +2 -0
- package/lib/Popconfirm/style/index.js +5 -0
- package/lib/Popconfirm/style/index.less +1 -0
- package/lib/Progress/index.d.ts +3 -0
- package/lib/Progress/index.js +13 -0
- package/lib/Progress/style/index.d.ts +2 -0
- package/lib/Progress/style/index.js +5 -0
- package/lib/Progress/style/index.less +1 -0
- package/lib/Select/style/variables.less.d.ts +6 -0
- package/lib/Steps/style/index.less +10 -4
- package/lib/Table/Table.js +51 -30
- package/lib/Table/components/TableHead/index.d.ts +0 -1
- package/lib/Table/components/TableHead/index.js +1 -2
- package/lib/Table/interface.d.ts +2 -0
- package/lib/Table/style/index.less +6 -1
- package/lib/Table/style/variable.less +0 -5
- package/lib/Table/style/variable.less.d.ts +1 -1
- package/lib/Table/utils.js +16 -9
- package/lib/Tabs/index.js +2 -2
- package/lib/Tabs/style/index.less +1 -1
- package/lib/Tooltip/index.d.ts +2 -2
- package/lib/Tooltip/index.js +4 -4
- package/lib/index.d.ts +7 -3
- package/lib/index.js +16 -0
- package/lib/style/themes/default/scrollBar.less +10 -7
- package/lib/style/themes/default/themeColor.module.less +176 -166
- package/lib/style/themes/default/themeColor.module.less.d.ts +6 -0
- package/package.json +3 -3
- package/es/Icon/icons.json +0 -418
- package/es/Table/hooks/useTableColumn.d.ts +0 -28
- package/es/Table/hooks/useTableColumn.js +0 -53
- package/es/Table/style/index.less.d.ts +0 -126
- package/lib/Icon/icons.json +0 -418
- package/lib/Table/hooks/useTableColumn.d.ts +0 -28
- package/lib/Table/hooks/useTableColumn.js +0 -66
- package/lib/Table/style/index.less.d.ts +0 -126
|
@@ -10,7 +10,19 @@ interface IShowCountProps {
|
|
|
10
10
|
export declare type TSize = 'small' | 'middle' | 'large';
|
|
11
11
|
export type { InputRef };
|
|
12
12
|
declare type ChangeEventHandler = (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
13
|
-
export interface IInputProps extends Omit<InputProps, 'size' | 'id' | 'prefix' | 'allowClear' | 'disabled' | 'showCount' | 'maxLength' | 'value' | 'defaultValue' | 'onPressEnter' | 'onChange'> {
|
|
13
|
+
export interface IInputProps extends Omit<InputProps, 'size' | 'id' | 'prefix' | 'allowClear' | 'disabled' | 'showCount' | 'maxLength' | 'value' | 'defaultValue' | 'onPressEnter' | 'onChange' | 'addonAfter' | 'addonBefore'> {
|
|
14
|
+
/**
|
|
15
|
+
* @description 带标签的input,设置后置标签
|
|
16
|
+
* @default -
|
|
17
|
+
* @type ReactNode
|
|
18
|
+
*/
|
|
19
|
+
addonAfter?: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* @description 带标签的input,设置前置标签
|
|
22
|
+
* @default -
|
|
23
|
+
* @type ReactNode
|
|
24
|
+
*/
|
|
25
|
+
addonBefore?: ReactNode;
|
|
14
26
|
/**
|
|
15
27
|
* @description 输入框尺寸
|
|
16
28
|
* @default default
|
|
@@ -8,7 +8,7 @@ import React from 'react';
|
|
|
8
8
|
import AntdInput from 'antd/lib/input/Input';
|
|
9
9
|
import classnames from 'classnames';
|
|
10
10
|
export function getSizeType(sizeType) {
|
|
11
|
-
if (['
|
|
11
|
+
if (['small', 'middle', 'large'].includes(sizeType)) {
|
|
12
12
|
return sizeType;
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -24,8 +24,6 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
24
24
|
ref: ref,
|
|
25
25
|
bordered: true,
|
|
26
26
|
className: classnames('ald-input', "ald-input-".concat(getSizeType(size)), className),
|
|
27
|
-
addonAfter: null,
|
|
28
|
-
addonBefore: null,
|
|
29
27
|
suffix: null
|
|
30
28
|
}));
|
|
31
29
|
});
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PasswordProps } from 'antd/lib/input/Password';
|
|
3
3
|
import { TSize } from '../Input';
|
|
4
|
+
export declare const iconSizeMap: {
|
|
5
|
+
small: number;
|
|
6
|
+
middle: number;
|
|
7
|
+
large: number;
|
|
8
|
+
};
|
|
4
9
|
export interface IPasswordProps extends Omit<PasswordProps, 'size'> {
|
|
5
10
|
/**
|
|
6
11
|
* @description 是否显示切换按钮
|
|
@@ -8,7 +13,7 @@ export interface IPasswordProps extends Omit<PasswordProps, 'size'> {
|
|
|
8
13
|
*/
|
|
9
14
|
visibilityToggle?: boolean;
|
|
10
15
|
/**
|
|
11
|
-
* @description
|
|
16
|
+
* @description 尺寸大小
|
|
12
17
|
* @default default
|
|
13
18
|
*/
|
|
14
19
|
size?: TSize;
|
|
@@ -11,7 +11,13 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import AntdPassword from 'antd/lib/input/Password';
|
|
13
13
|
import { getSizeType } from '../Input';
|
|
14
|
-
import classnames from 'classnames'; //
|
|
14
|
+
import classnames from 'classnames'; // 不同的size对应的不同的icon
|
|
15
|
+
|
|
16
|
+
export var iconSizeMap = {
|
|
17
|
+
small: 16,
|
|
18
|
+
middle: 20,
|
|
19
|
+
large: 24
|
|
20
|
+
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
21
|
|
|
16
22
|
export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
17
23
|
var _props$size = props.size,
|
|
@@ -24,9 +30,11 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
24
30
|
className: classnames('ald-input', "ald-input-".concat(getSizeType(size)), className),
|
|
25
31
|
iconRender: function iconRender(visible) {
|
|
26
32
|
return visible ? /*#__PURE__*/React.createElement(_EyeOnLine, {
|
|
27
|
-
fill: "currentColor"
|
|
33
|
+
fill: "currentColor",
|
|
34
|
+
size: iconSizeMap[size]
|
|
28
35
|
}) : /*#__PURE__*/React.createElement(_EyeOffLine, {
|
|
29
|
-
fill: "currentColor"
|
|
36
|
+
fill: "currentColor",
|
|
37
|
+
size: iconSizeMap[size]
|
|
30
38
|
});
|
|
31
39
|
}
|
|
32
40
|
}));
|
|
@@ -7,48 +7,47 @@
|
|
|
7
7
|
@ald-iconfont-css-prefix: anticon;
|
|
8
8
|
// size===large
|
|
9
9
|
@input-height-large: 36px;
|
|
10
|
-
@input-padding-large: 5px
|
|
10
|
+
@input-padding-large: 5px 13px;
|
|
11
11
|
@input-font-size-large: 16px;
|
|
12
12
|
@input-border-radius-large: 8px;
|
|
13
13
|
@input-prefix-margin-right-large: 8px;
|
|
14
|
+
@input-clear-icon-large: 20px;
|
|
14
15
|
// size===middle
|
|
15
16
|
@input-height-middle: 32px;
|
|
16
17
|
@input-padding-middle: 5px 11px;
|
|
17
18
|
@input-font-size-middle: 14px;
|
|
18
19
|
@input-border-radius-middle: 6px;
|
|
19
20
|
@input-prefix-margin-right-middle: 8px;
|
|
21
|
+
@input-clear-icon-middle: 16px;
|
|
20
22
|
// size===small
|
|
21
23
|
@input-height-small: 28px;
|
|
22
|
-
@input-padding-small: 5px
|
|
24
|
+
@input-padding-small: 5px 9px;
|
|
23
25
|
@input-font-size-small: 12px;
|
|
24
|
-
@input-border-radius-small:
|
|
26
|
+
@input-border-radius-small: 6px;
|
|
25
27
|
@input-prefix-margin-right-small: 4px;
|
|
26
|
-
|
|
27
|
-
@input-height-mini: 24px;
|
|
28
|
-
@input-padding-mini: 3px 7px;
|
|
29
|
-
@input-font-size-mini: 12px;
|
|
30
|
-
@input-border-radius-mini: 4px;
|
|
31
|
-
@input-prefix-margin-right-mini: 4px;
|
|
28
|
+
@input-clear-icon-small: 14px;
|
|
32
29
|
//custom status
|
|
33
|
-
@input-border-color: @
|
|
30
|
+
@input-border-color: @BG60;
|
|
34
31
|
@input-fontColor: @NL0;
|
|
35
|
-
@input-placeholder-color: @
|
|
36
|
-
@input-prefix-color: @
|
|
37
|
-
@input-bg-color: @
|
|
32
|
+
@input-placeholder-color: @NL50;
|
|
33
|
+
@input-prefix-color: @NL40;
|
|
34
|
+
@input-bg-color: @BG100;
|
|
38
35
|
// active status
|
|
39
|
-
@input-active-border-color: @
|
|
40
|
-
@input-box-shadow-active:
|
|
36
|
+
@input-active-border-color: @B40;
|
|
37
|
+
@input-box-shadow-active: @shadow-xs;
|
|
41
38
|
// disabled status
|
|
42
|
-
@input-disabled-border-color: @
|
|
43
|
-
@input-disabled-bg-color: @
|
|
44
|
-
@input-disabled-font-color: @
|
|
39
|
+
@input-disabled-border-color: @BG60;
|
|
40
|
+
@input-disabled-bg-color: @BG90;
|
|
41
|
+
@input-disabled-font-color: @NL40;
|
|
45
42
|
|
|
46
|
-
.ant-input.ald-input
|
|
43
|
+
.ant-input.ald-input,
|
|
44
|
+
.ald-input .ant-input {
|
|
47
45
|
color: @NL0;
|
|
48
46
|
font-weight: 400;
|
|
49
47
|
background-color: @input-bg-color;
|
|
50
48
|
border-color: @input-border-color;
|
|
51
49
|
border-radius: @input-border-radius-middle;
|
|
50
|
+
box-shadow: @shadow-xs;
|
|
52
51
|
caret-color: @B60;
|
|
53
52
|
|
|
54
53
|
&::placeholder {
|
|
@@ -170,17 +169,6 @@
|
|
|
170
169
|
}
|
|
171
170
|
|
|
172
171
|
.ald-input {
|
|
173
|
-
&.ald-input-mini {
|
|
174
|
-
height: @input-height-mini;
|
|
175
|
-
padding: @input-padding-mini;
|
|
176
|
-
font-size: @input-font-size-mini;
|
|
177
|
-
border-radius: @input-border-radius-mini;
|
|
178
|
-
|
|
179
|
-
.ant-input-prefix {
|
|
180
|
-
margin-right: @input-prefix-margin-right-mini;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
172
|
&.ald-input-small {
|
|
185
173
|
height: @input-height-small;
|
|
186
174
|
padding: @input-padding-small;
|
|
@@ -190,6 +178,10 @@
|
|
|
190
178
|
.ant-input-prefix {
|
|
191
179
|
margin-right: @input-prefix-margin-right-small;
|
|
192
180
|
}
|
|
181
|
+
|
|
182
|
+
.ant-input-suffix .ant-input-clear-icon {
|
|
183
|
+
font-size: @input-clear-icon-large;
|
|
184
|
+
}
|
|
193
185
|
}
|
|
194
186
|
|
|
195
187
|
&.ald-input-middle {
|
|
@@ -201,6 +193,10 @@
|
|
|
201
193
|
.ant-input-prefix {
|
|
202
194
|
margin-right: @input-prefix-margin-right-middle;
|
|
203
195
|
}
|
|
196
|
+
|
|
197
|
+
.ant-input-suffix .ant-input-clear-icon {
|
|
198
|
+
font-size: @input-clear-icon-middle;
|
|
199
|
+
}
|
|
204
200
|
}
|
|
205
201
|
|
|
206
202
|
&.ald-input-large {
|
|
@@ -212,6 +208,10 @@
|
|
|
212
208
|
.ant-input-prefix {
|
|
213
209
|
margin-right: @input-prefix-margin-right-large;
|
|
214
210
|
}
|
|
211
|
+
|
|
212
|
+
.ant-input-suffix .ant-input-clear-icon {
|
|
213
|
+
font-size: @input-clear-icon-small;
|
|
214
|
+
}
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
|
|
@@ -307,35 +307,6 @@
|
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
-
.ald-input-group-mini {
|
|
311
|
-
.ald-input {
|
|
312
|
-
height: @input-height-mini;
|
|
313
|
-
padding: @input-padding-mini;
|
|
314
|
-
font-size: @input-font-size-mini;
|
|
315
|
-
border-radius: @input-border-radius-mini;
|
|
316
|
-
|
|
317
|
-
&.ant-input {
|
|
318
|
-
border-radius: @input-border-radius-mini;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.ant-input-prefix {
|
|
322
|
-
margin-right: @input-prefix-margin-right-mini;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
&.ant-input-group-compact {
|
|
327
|
-
.ald-input {
|
|
328
|
-
&:first-of-type {
|
|
329
|
-
border-radius: @input-border-radius-mini 0 0 @input-border-radius-mini;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
&:last-of-type {
|
|
333
|
-
border-radius: 0 @input-border-radius-mini @input-border-radius-mini 0;
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
310
|
.ald-textarea-large {
|
|
340
311
|
padding: 5px 11px;
|
|
341
312
|
font-size: @font-size-large;
|
|
@@ -408,3 +379,112 @@ textarea.ald-input-textarea,
|
|
|
408
379
|
font-size: 11px;
|
|
409
380
|
line-height: 16px;
|
|
410
381
|
}
|
|
382
|
+
|
|
383
|
+
.ant-input-group-wrapper {
|
|
384
|
+
&.ald-input-large {
|
|
385
|
+
.ant-input-group-addon {
|
|
386
|
+
padding: 4px 14px;
|
|
387
|
+
font-size: @input-font-size-large;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.ant-input {
|
|
391
|
+
height: @input-height-large;
|
|
392
|
+
padding: @input-padding-large;
|
|
393
|
+
font-size: @input-font-size-large;
|
|
394
|
+
|
|
395
|
+
.ant-input-prefix {
|
|
396
|
+
margin-right: @input-prefix-margin-right-large;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.ant-input-suffix .ant-input-clear-icon {
|
|
400
|
+
font-size: @input-clear-icon-small;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.ant-input:first-child,
|
|
405
|
+
.ant-input-group-addon:first-child {
|
|
406
|
+
border-radius: @input-border-radius-large 0 0 @input-border-radius-large;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.ant-input:last-child,
|
|
410
|
+
.ant-input-group-addon:last-child {
|
|
411
|
+
border-radius: 0 @input-border-radius-large @input-border-radius-large 0;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
&.ald-input-middle {
|
|
416
|
+
.ant-input-group-addon {
|
|
417
|
+
padding: 4px 12px;
|
|
418
|
+
font-size: @input-font-size-middle;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.ant-input {
|
|
422
|
+
height: @input-height-middle;
|
|
423
|
+
padding: @input-padding-middle;
|
|
424
|
+
font-size: @input-font-size-middle;
|
|
425
|
+
|
|
426
|
+
.ant-input-prefix {
|
|
427
|
+
margin-right: @input-prefix-margin-right-middle;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.ant-input-suffix .ant-input-clear-icon {
|
|
431
|
+
font-size: @input-clear-icon-middle;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.ant-input:first-child,
|
|
436
|
+
.ant-input-group-addon:first-child {
|
|
437
|
+
border-radius: @input-border-radius-middle 0 0 @input-border-radius-middle;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.ant-input:last-child,
|
|
441
|
+
.ant-input-group-addon:last-child {
|
|
442
|
+
border-radius: 0 @input-border-radius-middle @input-border-radius-middle 0;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
&.ald-input-small {
|
|
447
|
+
.ant-input-group-addon {
|
|
448
|
+
padding: 3px 10px;
|
|
449
|
+
font-size: @input-font-size-small;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.ant-input {
|
|
453
|
+
height: @input-height-small;
|
|
454
|
+
padding: @input-padding-small;
|
|
455
|
+
font-size: @input-font-size-small;
|
|
456
|
+
|
|
457
|
+
.ant-input-prefix {
|
|
458
|
+
margin-right: @input-prefix-margin-right-small;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.ant-input-suffix .ant-input-clear-icon {
|
|
462
|
+
font-size: @input-clear-icon-small;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.ant-input:first-child,
|
|
467
|
+
.ant-input-group-addon:first-child {
|
|
468
|
+
border-radius: @input-border-radius-small 0 0 @input-border-radius-small;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.ant-input:last-child,
|
|
472
|
+
.ant-input-group-addon:last-child {
|
|
473
|
+
border-radius: 0 @input-border-radius-small @input-border-radius-small 0;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.ant-input-group-addon {
|
|
478
|
+
background-color: @input-bg-color;
|
|
479
|
+
|
|
480
|
+
&:first-child {
|
|
481
|
+
border-top-right-radius: 0;
|
|
482
|
+
border-bottom-right-radius: 0;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
&:last-child {
|
|
486
|
+
border-top-left-radius: 0;
|
|
487
|
+
border-bottom-left-radius: 0;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export default function InputNumber(props:
|
|
4
|
-
export type {
|
|
2
|
+
import { IInputNumberProps } from './type';
|
|
3
|
+
export default function InputNumber(props: IInputNumberProps): JSX.Element;
|
|
4
|
+
export type { IInputNumberProps };
|
|
@@ -4,35 +4,39 @@
|
|
|
4
4
|
@inputNumber-height-large: 36px;
|
|
5
5
|
@inputNumber-font-size-large: 16px;
|
|
6
6
|
@inputNumber-border-radius-large: 8px;
|
|
7
|
+
@inputNumber-padding-large: 0 14px;
|
|
7
8
|
|
|
8
9
|
@inputNumber-height-middle: 32px;
|
|
9
10
|
@inputNumber-font-size-middle: 14px;
|
|
10
|
-
@inputNumber-border-radius-middle:
|
|
11
|
+
@inputNumber-border-radius-middle: 8px;
|
|
12
|
+
@inputNumber-padding-middle: 0 12px;
|
|
11
13
|
|
|
12
14
|
@inputNumber-height-small: 28px;
|
|
13
15
|
@inputNumber-font-size-small: 12px;
|
|
14
|
-
@inputNumber-border-radius-small:
|
|
16
|
+
@inputNumber-border-radius-small: 6px;
|
|
17
|
+
@inputNumber-padding-small: 0 10px;
|
|
18
|
+
|
|
15
19
|
//默认
|
|
16
|
-
@inputNumber-bg-color: @
|
|
17
|
-
@inputNumber-border-color: @
|
|
20
|
+
@inputNumber-bg-color: @BG100;
|
|
21
|
+
@inputNumber-border-color: @BG60;
|
|
18
22
|
@inputNumber-color: @NL0;
|
|
19
23
|
@inputNumber-wrapper-bg-color: @BG95;
|
|
20
24
|
//激活
|
|
21
|
-
@inputNumber-active-bg-color: @
|
|
22
|
-
@inputNumber-active-border-color: @
|
|
25
|
+
@inputNumber-active-bg-color: @BG100;
|
|
26
|
+
@inputNumber-active-border-color: @B40;
|
|
23
27
|
|
|
24
28
|
//disable
|
|
25
|
-
@inputNumber-disabled-bg-color: @
|
|
26
|
-
@inputNumber-disabled-border-color: @
|
|
27
|
-
@inputNumber-disabled-color: @
|
|
29
|
+
@inputNumber-disabled-bg-color: @BG90;
|
|
30
|
+
@inputNumber-disabled-border-color: @BG60;
|
|
31
|
+
@inputNumber-disabled-color: @NL40;
|
|
28
32
|
//光标颜色
|
|
29
33
|
@inputNumber-cursor-color: @B60;
|
|
30
34
|
|
|
31
35
|
//前后填充
|
|
32
|
-
@inputNumber-addon-bg-color: @
|
|
33
|
-
@inputNumber-addon-color: @
|
|
34
|
-
@inputNumber-addon-border-color: @
|
|
35
|
-
@inputNumber-addon-disable-color: @
|
|
36
|
+
@inputNumber-addon-bg-color: @BG100;
|
|
37
|
+
@inputNumber-addon-color: @NL40;
|
|
38
|
+
@inputNumber-addon-border-color: @BG60;
|
|
39
|
+
@inputNumber-addon-disable-color: @NL40;
|
|
36
40
|
|
|
37
41
|
.ald-inputNumber {
|
|
38
42
|
&.ant-input-number {
|
|
@@ -57,30 +61,51 @@
|
|
|
57
61
|
.ant-input-number-handler-wrap {
|
|
58
62
|
overflow: hidden;
|
|
59
63
|
|
|
64
|
+
&:hover .ant-input-number-handler {
|
|
65
|
+
height: 50%;
|
|
66
|
+
}
|
|
67
|
+
|
|
60
68
|
.ant-input-number-handler {
|
|
61
|
-
background-color: @
|
|
69
|
+
background-color: @BG100;
|
|
62
70
|
|
|
63
71
|
.ant-input-number-handler-up-inner,
|
|
64
72
|
.ant-input-number-handler-down-inner {
|
|
65
|
-
color: @
|
|
73
|
+
color: @NL40;
|
|
66
74
|
}
|
|
67
75
|
|
|
68
76
|
&:hover,
|
|
69
77
|
&:active {
|
|
70
|
-
background-color: @
|
|
78
|
+
background-color: @BG100;
|
|
71
79
|
|
|
72
80
|
.ant-input-number-handler-up-inner,
|
|
73
81
|
.ant-input-number-handler-down-inner {
|
|
74
|
-
color: @
|
|
82
|
+
color: @NL40;
|
|
75
83
|
}
|
|
76
84
|
}
|
|
77
85
|
}
|
|
86
|
+
|
|
87
|
+
.ant-input-number-handler-down {
|
|
88
|
+
border-top: 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.ant-input-number-handler-up:hover {
|
|
92
|
+
height: 50% !important; // antd中就是 !important写法,这里做覆盖
|
|
93
|
+
background: @BG80;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.ant-input-number-handler-down:hover {
|
|
97
|
+
height: 50% !important; // 这里的!important同上
|
|
98
|
+
background: @BG80;
|
|
99
|
+
}
|
|
78
100
|
}
|
|
79
101
|
|
|
80
102
|
&.ald-inputNumber-large {
|
|
81
103
|
height: @inputNumber-height-large;
|
|
82
104
|
font-size: @inputNumber-font-size-large;
|
|
83
|
-
|
|
105
|
+
|
|
106
|
+
.ant-input-number-input {
|
|
107
|
+
padding: @inputNumber-padding-large;
|
|
108
|
+
}
|
|
84
109
|
|
|
85
110
|
.ant-input-number-handler-wrap {
|
|
86
111
|
border-radius: 0 @inputNumber-border-radius-large @inputNumber-border-radius-large 0;
|
|
@@ -90,7 +115,10 @@
|
|
|
90
115
|
&.ald-inputNumber-middle {
|
|
91
116
|
height: @inputNumber-height-middle;
|
|
92
117
|
font-size: @inputNumber-font-size-middle;
|
|
93
|
-
|
|
118
|
+
|
|
119
|
+
.ant-input-number-input {
|
|
120
|
+
padding: @inputNumber-padding-middle;
|
|
121
|
+
}
|
|
94
122
|
|
|
95
123
|
.ant-input-number-handler-wrap {
|
|
96
124
|
border-radius: 0 @inputNumber-border-radius-middle @inputNumber-border-radius-middle 0;
|
|
@@ -100,10 +128,13 @@
|
|
|
100
128
|
&.ald-inputNumber-small {
|
|
101
129
|
height: @inputNumber-height-small;
|
|
102
130
|
font-size: @inputNumber-font-size-small;
|
|
103
|
-
|
|
131
|
+
|
|
132
|
+
.ant-input-number-input {
|
|
133
|
+
padding: @inputNumber-padding-small;
|
|
134
|
+
}
|
|
104
135
|
|
|
105
136
|
.ant-input-number-handler-wrap {
|
|
106
|
-
border-radius: 0 @inputNumber-border-radius-small @inputNumber-border-radius-small 0;
|
|
137
|
+
border-radius: 0 @inputNumber-border-radius-small+1 @inputNumber-border-radius-small+1 0;
|
|
107
138
|
}
|
|
108
139
|
}
|
|
109
140
|
|
|
@@ -122,7 +153,7 @@
|
|
|
122
153
|
&-focused {
|
|
123
154
|
background-color: @inputNumber-active-bg-color;
|
|
124
155
|
border-color: @inputNumber-active-border-color;
|
|
125
|
-
box-shadow:
|
|
156
|
+
box-shadow: @shadow-primary;
|
|
126
157
|
}
|
|
127
158
|
}
|
|
128
159
|
|
|
@@ -139,6 +170,9 @@
|
|
|
139
170
|
border-radius: @inputNumber-border-radius-large;
|
|
140
171
|
|
|
141
172
|
.ant-input-number-group-addon {
|
|
173
|
+
height: @inputNumber-height-large;
|
|
174
|
+
padding: 0 14px;
|
|
175
|
+
|
|
142
176
|
&:first-child {
|
|
143
177
|
border-radius: @inputNumber-border-radius-large 0 0 @inputNumber-border-radius-large;
|
|
144
178
|
}
|
|
@@ -146,6 +180,10 @@
|
|
|
146
180
|
&:last-child {
|
|
147
181
|
border-radius: 0 @inputNumber-border-radius-large @inputNumber-border-radius-large 0;
|
|
148
182
|
}
|
|
183
|
+
|
|
184
|
+
& + .ant-input-number {
|
|
185
|
+
border-radius: 0;
|
|
186
|
+
}
|
|
149
187
|
}
|
|
150
188
|
}
|
|
151
189
|
|
|
@@ -154,6 +192,9 @@
|
|
|
154
192
|
border-radius: @inputNumber-border-radius-middle;
|
|
155
193
|
|
|
156
194
|
.ant-input-number-group-addon {
|
|
195
|
+
height: @inputNumber-height-middle;
|
|
196
|
+
padding: 0 12px;
|
|
197
|
+
|
|
157
198
|
&:first-child {
|
|
158
199
|
border-radius: @inputNumber-border-radius-middle 0 0 @inputNumber-border-radius-middle;
|
|
159
200
|
}
|
|
@@ -169,6 +210,9 @@
|
|
|
169
210
|
border-radius: @inputNumber-border-radius-small;
|
|
170
211
|
|
|
171
212
|
.ant-input-number-group-addon {
|
|
213
|
+
height: @inputNumber-height-small;
|
|
214
|
+
padding: 0 10px;
|
|
215
|
+
|
|
172
216
|
&:first-child {
|
|
173
217
|
border-radius: @inputNumber-border-radius-small 0 0 @inputNumber-border-radius-small;
|
|
174
218
|
}
|
|
@@ -208,10 +252,6 @@
|
|
|
208
252
|
z-index: 2;
|
|
209
253
|
margin: 0;
|
|
210
254
|
padding: 0;
|
|
211
|
-
|
|
212
|
-
.ant-input-number-handler-wrap {
|
|
213
|
-
border-radius: 0;
|
|
214
|
-
}
|
|
215
255
|
}
|
|
216
256
|
}
|
|
217
257
|
|