carbon-react 104.16.0 → 104.16.1
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,9 +1,9 @@
|
|
|
1
1
|
export default Decimal;
|
|
2
2
|
declare function Decimal({ align, defaultValue, precision, inputWidth, readOnly, onChange, onBlur, onKeyPress, id, name, allowEmptyValue, required, locale, value, ...rest }: {
|
|
3
3
|
[x: string]: any;
|
|
4
|
-
align
|
|
4
|
+
align: any;
|
|
5
5
|
defaultValue: any;
|
|
6
|
-
precision
|
|
6
|
+
precision: any;
|
|
7
7
|
inputWidth: any;
|
|
8
8
|
readOnly: any;
|
|
9
9
|
onChange: any;
|
|
@@ -11,7 +11,7 @@ declare function Decimal({ align, defaultValue, precision, inputWidth, readOnly,
|
|
|
11
11
|
onKeyPress: any;
|
|
12
12
|
id: any;
|
|
13
13
|
name: any;
|
|
14
|
-
allowEmptyValue
|
|
14
|
+
allowEmptyValue: any;
|
|
15
15
|
required: any;
|
|
16
16
|
locale: any;
|
|
17
17
|
value: any;
|
|
@@ -77,5 +77,10 @@ declare namespace Decimal {
|
|
|
77
77
|
/** Aria label for rendered help component */
|
|
78
78
|
helpAriaLabel: PropTypes.Requireable<string>;
|
|
79
79
|
};
|
|
80
|
+
namespace defaultProps {
|
|
81
|
+
const precision: number;
|
|
82
|
+
const allowEmptyValue: boolean;
|
|
83
|
+
const align: string;
|
|
84
|
+
}
|
|
80
85
|
}
|
|
81
86
|
import PropTypes from "prop-types";
|
|
@@ -30,9 +30,9 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
30
30
|
const marginPropTypes = (0, _utils.filterStyledSystemMarginProps)(_propTypes2.default.space);
|
|
31
31
|
|
|
32
32
|
const Decimal = ({
|
|
33
|
-
align
|
|
33
|
+
align,
|
|
34
34
|
defaultValue,
|
|
35
|
-
precision
|
|
35
|
+
precision,
|
|
36
36
|
inputWidth,
|
|
37
37
|
readOnly,
|
|
38
38
|
onChange,
|
|
@@ -40,7 +40,7 @@ const Decimal = ({
|
|
|
40
40
|
onKeyPress,
|
|
41
41
|
id,
|
|
42
42
|
name,
|
|
43
|
-
allowEmptyValue
|
|
43
|
+
allowEmptyValue,
|
|
44
44
|
required,
|
|
45
45
|
locale,
|
|
46
46
|
value,
|
|
@@ -309,5 +309,10 @@ Decimal.propTypes = {
|
|
|
309
309
|
/** Aria label for rendered help component */
|
|
310
310
|
helpAriaLabel: _propTypes.default.string
|
|
311
311
|
};
|
|
312
|
+
Decimal.defaultProps = {
|
|
313
|
+
precision: 2,
|
|
314
|
+
allowEmptyValue: false,
|
|
315
|
+
align: "right"
|
|
316
|
+
};
|
|
312
317
|
var _default = Decimal;
|
|
313
318
|
exports.default = _default;
|