@aveonline/ui-react 1.8.2 → 1.8.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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IKind } from '../../atoms/Icon';
|
|
2
2
|
import { ITooltipProps } from '../../atoms/Tooltip/ITooltip';
|
|
3
|
+
import type { IFieldCustom } from './IFieldCustom';
|
|
3
4
|
export interface IField {
|
|
4
5
|
/**
|
|
5
6
|
* ID available for link form
|
|
@@ -78,5 +79,6 @@ export interface IField {
|
|
|
78
79
|
/**
|
|
79
80
|
* Types input custom
|
|
80
81
|
*/
|
|
81
|
-
variant?: 'currency' | '';
|
|
82
|
+
variant?: 'currency' | 'custom' | '';
|
|
83
|
+
custom?: IFieldCustom;
|
|
82
84
|
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
declare type IFieldCustom = {
|
|
2
|
+
/**
|
|
3
|
+
* Allow decimals
|
|
4
|
+
*
|
|
5
|
+
* Default = true
|
|
6
|
+
*/
|
|
7
|
+
allowDecimals?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Allow user to enter negative value
|
|
10
|
+
*
|
|
11
|
+
* Default = true
|
|
12
|
+
*/
|
|
13
|
+
allowNegativeValue?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Maximum characters the user can enter
|
|
16
|
+
*/
|
|
17
|
+
maxLength?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Class names
|
|
20
|
+
*/
|
|
21
|
+
className?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Limit length of decimals allowed
|
|
24
|
+
*
|
|
25
|
+
* Default = 2
|
|
26
|
+
*/
|
|
27
|
+
decimalsLimit?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Specify decimal scale for padding/trimming
|
|
30
|
+
*
|
|
31
|
+
* Example:
|
|
32
|
+
* 1.5 -> 1.50
|
|
33
|
+
* 1.234 -> 1.23
|
|
34
|
+
*/
|
|
35
|
+
decimalScale?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Value will always have the specified length of decimals
|
|
38
|
+
*
|
|
39
|
+
* Example:
|
|
40
|
+
* 123 -> 1.23
|
|
41
|
+
*
|
|
42
|
+
* Note: This formatting only happens onBlur
|
|
43
|
+
*/
|
|
44
|
+
fixedDecimalLength?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Include a prefix eg. £
|
|
47
|
+
*/
|
|
48
|
+
prefix?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Include a suffix eg. €
|
|
51
|
+
*/
|
|
52
|
+
suffix?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Incremental value change on arrow down and arrow up key press
|
|
55
|
+
*/
|
|
56
|
+
step?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Separator between integer part and fractional part of value.
|
|
59
|
+
*
|
|
60
|
+
* This cannot be a number
|
|
61
|
+
*/
|
|
62
|
+
decimalSeparator?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Separator between thousand, million and billion
|
|
65
|
+
*
|
|
66
|
+
* This cannot be a number
|
|
67
|
+
*/
|
|
68
|
+
groupSeparator?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Disable auto adding separator between values eg. 1000 -> 1,000
|
|
71
|
+
*
|
|
72
|
+
* Default = false
|
|
73
|
+
*/
|
|
74
|
+
disableGroupSeparators?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Disable abbreviations (m, k, b)
|
|
77
|
+
*
|
|
78
|
+
* Default = false
|
|
79
|
+
*/
|
|
80
|
+
disableAbbreviations?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Transform the raw value form the input before parsing
|
|
83
|
+
*/
|
|
84
|
+
transformRawValue?: (rawValue: string) => string;
|
|
85
|
+
};
|
|
86
|
+
export type { IFieldCustom };
|