Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
xor (...args) {
warnDeprecatedComponent('v5.45.0', 'xor', changedPackageWarning(
'ui-utils',
'ui-prop-types'
))
return xor(...args)
}
}
class NumberInput extends Component {
static propTypes = {
label: PropTypes.node.isRequired,
id: PropTypes.string,
showArrows: PropTypes.bool,
step: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
min: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
max: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
/**
* Specify the number of digits to display after the decimal separator. If
* the input has more digits after the decimal separator, it will be
* rounded on blur. If it has less, trailing zeros will be added on blur.
*
* Pass either decimalPrecision or significantDigits, not both.
*/
decimalPrecision: xor(PropTypes.number, 'significantDigits'),
/**
* Specify the number of significant digits. If the input has more
* significant digits, it will be rounded on blur. If it has less, traling
* zeros will be added on blur.
*
* Pass either decimalPrecision or significantDigits, not both.
*/
significantDigits: xor(PropTypes.number, 'decimalPrecision'),
/**
* object with shape: `{
* text: PropTypes.string,
* type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
* }`
*/
messages: PropTypes.arrayOf(FormPropTypes.message),
/**
/**
* Specify the number of digits to display after the decimal separator. If
* the input has more digits after the decimal separator, it will be
* rounded on blur. If it has less, trailing zeros will be added on blur.
*
* Pass either decimalPrecision or significantDigits, not both.
*/
decimalPrecision: xor(PropTypes.number, 'significantDigits'),
/**
* Specify the number of significant digits. If the input has more
* significant digits, it will be rounded on blur. If it has less, traling
* zeros will be added on blur.
*
* Pass either decimalPrecision or significantDigits, not both.
*/
significantDigits: xor(PropTypes.number, 'decimalPrecision'),
/**
* object with shape: `{
* text: PropTypes.string,
* type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
* }`
*/
messages: PropTypes.arrayOf(FormPropTypes.message),
/**
A standard language id
**/
locale: PropTypes.string,
size: PropTypes.oneOf(['medium', 'large']),
layout: PropTypes.oneOf(['stacked', 'inline']),
width: PropTypes.string,
inline: PropTypes.bool,
/**