@hig/input
Advanced tools
Comparing version 1.1.6 to 1.2.0
@@ -255,3 +255,4 @@ import React from 'react'; | ||
hasFocus = _ref2.hasFocus, | ||
hasHover = _ref2.hasHover; | ||
hasHover = _ref2.hasHover, | ||
error = _ref2.error; | ||
@@ -278,2 +279,7 @@ var defaults = { | ||
} | ||
if (error) { | ||
return _extends$2({}, defaults, { | ||
borderBottomColor: themeData["input.error.borderBottomColor"] | ||
}); | ||
} | ||
return defaults; | ||
@@ -338,3 +344,4 @@ } | ||
variant = props.variant, | ||
otherProps = _objectWithoutProperties$1(props, ["children", "hasFocus", "hasHover", "isDisabled", "stylesheet", "variant"]); | ||
error = props.error, | ||
otherProps = _objectWithoutProperties$1(props, ["children", "hasFocus", "hasHover", "isDisabled", "stylesheet", "variant", "error"]); | ||
@@ -348,3 +355,3 @@ return React.createElement( | ||
var styles = stylesheet$1({ isDisabled: isDisabled, hasFocus: hasFocus, hasHover: hasHover, variant: variant }, resolvedRoles); | ||
var styles = stylesheet$1({ isDisabled: isDisabled, hasFocus: hasFocus, hasHover: hasHover, variant: variant, error: error }, resolvedRoles); | ||
var cssStyles = customStylesheet ? customStylesheet(styles, props, resolvedRoles, metadata.colorSchemeId) : styles; | ||
@@ -375,3 +382,4 @@ | ||
stylesheet: PropTypes.func, | ||
variant: PropTypes.oneOf(availableVariants) | ||
variant: PropTypes.oneOf(availableVariants), | ||
error: PropTypes.bool | ||
}; | ||
@@ -425,2 +433,9 @@ InputHaloPresenter.__docgenInfo = { | ||
"description": "" | ||
}, | ||
"error": { | ||
"type": { | ||
"name": "bool" | ||
}, | ||
"required": false, | ||
"description": "" | ||
} | ||
@@ -457,3 +472,4 @@ } | ||
variant = props.variant, | ||
otherProps = _objectWithoutProperties$2(props, ["onFocus", "onBlur", "onMouseEnter", "onMouseLeave", "disabled", "stylesheet", "tagName", "variant"]); | ||
error = props.error, | ||
otherProps = _objectWithoutProperties$2(props, ["onFocus", "onBlur", "onMouseEnter", "onMouseLeave", "disabled", "stylesheet", "tagName", "variant", "error"]); | ||
@@ -483,3 +499,4 @@ return React.createElement( | ||
tagName: tagName, | ||
variant: variant | ||
variant: variant, | ||
error: error | ||
}, otherProps), | ||
@@ -543,3 +560,7 @@ React.createElement(InputPresenter, _extends$3({ | ||
*/ | ||
variant: PropTypes.oneOf(availableVariants) | ||
variant: PropTypes.oneOf(availableVariants), | ||
/** | ||
* Specify if the value of the input is wrong | ||
*/ | ||
error: PropTypes.bool | ||
}; | ||
@@ -549,3 +570,4 @@ | ||
tagName: tagNames.INPUT, | ||
variant: variants.LINE | ||
variant: variants.LINE, | ||
error: false | ||
}; | ||
@@ -637,2 +659,13 @@ Input.__docgenInfo = { | ||
} | ||
}, | ||
"error": { | ||
"type": { | ||
"name": "bool" | ||
}, | ||
"required": false, | ||
"description": "Specify if the value of the input is wrong", | ||
"defaultValue": { | ||
"value": "false", | ||
"computed": false | ||
} | ||
} | ||
@@ -639,0 +672,0 @@ } |
@@ -261,3 +261,4 @@ 'use strict'; | ||
hasFocus = _ref2.hasFocus, | ||
hasHover = _ref2.hasHover; | ||
hasHover = _ref2.hasHover, | ||
error = _ref2.error; | ||
@@ -284,2 +285,7 @@ var defaults = { | ||
} | ||
if (error) { | ||
return _extends$2({}, defaults, { | ||
borderBottomColor: themeData["input.error.borderBottomColor"] | ||
}); | ||
} | ||
return defaults; | ||
@@ -344,3 +350,4 @@ } | ||
variant = props.variant, | ||
otherProps = _objectWithoutProperties$1(props, ["children", "hasFocus", "hasHover", "isDisabled", "stylesheet", "variant"]); | ||
error = props.error, | ||
otherProps = _objectWithoutProperties$1(props, ["children", "hasFocus", "hasHover", "isDisabled", "stylesheet", "variant", "error"]); | ||
@@ -354,3 +361,3 @@ return React.createElement( | ||
var styles = stylesheet$1({ isDisabled: isDisabled, hasFocus: hasFocus, hasHover: hasHover, variant: variant }, resolvedRoles); | ||
var styles = stylesheet$1({ isDisabled: isDisabled, hasFocus: hasFocus, hasHover: hasHover, variant: variant, error: error }, resolvedRoles); | ||
var cssStyles = customStylesheet ? customStylesheet(styles, props, resolvedRoles, metadata.colorSchemeId) : styles; | ||
@@ -381,3 +388,4 @@ | ||
stylesheet: PropTypes.func, | ||
variant: PropTypes.oneOf(availableVariants) | ||
variant: PropTypes.oneOf(availableVariants), | ||
error: PropTypes.bool | ||
}; | ||
@@ -431,2 +439,9 @@ InputHaloPresenter.__docgenInfo = { | ||
"description": "" | ||
}, | ||
"error": { | ||
"type": { | ||
"name": "bool" | ||
}, | ||
"required": false, | ||
"description": "" | ||
} | ||
@@ -463,3 +478,4 @@ } | ||
variant = props.variant, | ||
otherProps = _objectWithoutProperties$2(props, ["onFocus", "onBlur", "onMouseEnter", "onMouseLeave", "disabled", "stylesheet", "tagName", "variant"]); | ||
error = props.error, | ||
otherProps = _objectWithoutProperties$2(props, ["onFocus", "onBlur", "onMouseEnter", "onMouseLeave", "disabled", "stylesheet", "tagName", "variant", "error"]); | ||
@@ -489,3 +505,4 @@ return React.createElement( | ||
tagName: tagName, | ||
variant: variant | ||
variant: variant, | ||
error: error | ||
}, otherProps), | ||
@@ -549,3 +566,7 @@ React.createElement(InputPresenter, _extends$3({ | ||
*/ | ||
variant: PropTypes.oneOf(availableVariants) | ||
variant: PropTypes.oneOf(availableVariants), | ||
/** | ||
* Specify if the value of the input is wrong | ||
*/ | ||
error: PropTypes.bool | ||
}; | ||
@@ -555,3 +576,4 @@ | ||
tagName: tagNames.INPUT, | ||
variant: variants.LINE | ||
variant: variants.LINE, | ||
error: false | ||
}; | ||
@@ -643,2 +665,13 @@ Input.__docgenInfo = { | ||
} | ||
}, | ||
"error": { | ||
"type": { | ||
"name": "bool" | ||
}, | ||
"required": false, | ||
"description": "Specify if the value of the input is wrong", | ||
"defaultValue": { | ||
"value": "false", | ||
"computed": false | ||
} | ||
} | ||
@@ -645,0 +678,0 @@ } |
@@ -0,1 +1,8 @@ | ||
# [@hig/input-v1.2.0](https://github.com/Autodesk/hig/compare/@hig/input@1.1.6...@hig/input@1.2.0) (2019-09-05) | ||
### Features | ||
* add error state for Input ([10b7875](https://github.com/Autodesk/hig/commit/10b7875)) | ||
# [@hig/input-v1.1.6](https://github.com/Autodesk/hig/compare/@hig/input@1.1.5...@hig/input@1.1.6) (2019-08-07) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "@hig/input", | ||
"version": "1.1.6", | ||
"version": "1.2.0", | ||
"description": "HIG Input", | ||
@@ -33,3 +33,3 @@ "author": "Autodesk Inc.", | ||
"@hig/theme-context": "^3.0.0", | ||
"@hig/theme-data": "^2.10.0", | ||
"@hig/theme-data": "^2.10.1", | ||
"react": "^15.4.1 || ^16.3.2" | ||
@@ -36,0 +36,0 @@ }, |
@@ -29,1 +29,4 @@ # Input | ||
``` | ||
## Custom CSS | ||
Use the `className` prop to pass in a css class name to the outermost container of the component. The class name will also pass down to most of the other styled elements within the component. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43438
1238
32