@ausbom/form
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -6,2 +6,16 @@ # Change Log | ||
<a name="0.2.5"></a> | ||
## [0.2.5](https://github.com/AusBOM/bom-design-system/compare/@ausbom/form@0.2.4...@ausbom/form@0.2.5) (2020-03-13) | ||
### Bug Fixes | ||
* a11y [#32](https://github.com/AusBOM/bom-design-system/issues/32) associate errors with input for text and select ([32dd03b](https://github.com/AusBOM/bom-design-system/commit/32dd03b)) | ||
* a11y [#33](https://github.com/AusBOM/bom-design-system/issues/33) add border to alerts in high contrast mode ([a19ca33](https://github.com/AusBOM/bom-design-system/commit/a19ca33)) | ||
* fixes icons and form elements in windows high contrast mode ([cd181fb](https://github.com/AusBOM/bom-design-system/commit/cd181fb)) | ||
<a name="0.2.4"></a> | ||
@@ -8,0 +22,0 @@ ## [0.2.4](https://github.com/AusBOM/bom-design-system/compare/@ausbom/form@0.2.3...@ausbom/form@0.2.4) (2020-03-13) |
@@ -1,1 +0,1 @@ | ||
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _classnames=_interopRequireDefault(require("classnames"));var _react=_interopRequireDefault(require("react"));var _Label=_interopRequireDefault(require("../Label/Label"));var _Status=_interopRequireDefault(require("../Status/Status"));var _types=require("../../types.d");var Select=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(Select,_React$PureComponent);function Select(){(0,_classCallCheck2["default"])(this,Select);return(0,_possibleConstructorReturn2["default"])(this,(0,_getPrototypeOf2["default"])(Select).apply(this,arguments))}(0,_createClass2["default"])(Select,[{key:"render",value:function render(){var _ref=this.props,id=_ref.id,helpText=_ref.helpText,children=_ref.children,className=_ref.className,innerRef=_ref.innerRef,label=_ref.label,hideLabel=_ref.hideLabel,small=_ref.small,status=_ref.status,statusMessage=_ref.statusMessage,restProps=(0,_objectWithoutProperties2["default"])(_ref,["id","helpText","children","className","innerRef","label","hideLabel","small","status","statusMessage"]);var classes=(0,_classnames["default"])(className,"bom-form-select",{"bom-form-select--error":status===_types.Status.Error,"bom-form-select--success":status===_types.Status.Success,"bom-form-select--small":small,"bom-form-select--hide-label":hideLabel});return _react["default"].createElement("div",{className:classes},_react["default"].createElement(_Label["default"],{className:"bom-form-select__label",htmlFor:id,small:small,"data-testid":"bom-select-label"},label),_react["default"].createElement("select",(0,_extends2["default"])({id:id,className:"bom-form-select__input",ref:innerRef,"data-testid":"bom-select-input","aria-invalid":status===_types.Status.Error},restProps),children),statusMessage&&_react["default"].createElement(_Status["default"],{className:"bom-form-select__status",message:statusMessage,status:status,small:small}),helpText&&_react["default"].createElement(_Status["default"],{className:"bom-form-select__help",message:helpText,small:small}))}}]);return Select}(_react["default"].PureComponent);(0,_defineProperty2["default"])(Select,"defaultProps",{small:false,hideLabel:false});var SelectWithRef=_react["default"].forwardRef(function(props,ref){return _react["default"].createElement(Select,(0,_extends2["default"])({innerRef:ref},props))});SelectWithRef.displayName="Select";var _default=SelectWithRef;exports["default"]=_default; | ||
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _classnames=_interopRequireDefault(require("classnames"));var _react=_interopRequireDefault(require("react"));var _Label=_interopRequireDefault(require("../Label/Label"));var _Status=_interopRequireDefault(require("../Status/Status"));var _types=require("../../types.d");var Select=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(Select,_React$PureComponent);function Select(){(0,_classCallCheck2["default"])(this,Select);return(0,_possibleConstructorReturn2["default"])(this,(0,_getPrototypeOf2["default"])(Select).apply(this,arguments))}(0,_createClass2["default"])(Select,[{key:"render",value:function render(){var _ref=this.props,id=_ref.id,helpText=_ref.helpText,children=_ref.children,className=_ref.className,innerRef=_ref.innerRef,label=_ref.label,hideLabel=_ref.hideLabel,small=_ref.small,status=_ref.status,statusMessage=_ref.statusMessage,restProps=(0,_objectWithoutProperties2["default"])(_ref,["id","helpText","children","className","innerRef","label","hideLabel","small","status","statusMessage"]);var classes=(0,_classnames["default"])(className,"bom-form-select",{"bom-form-select--error":status===_types.Status.Error,"bom-form-select--success":status===_types.Status.Success,"bom-form-select--small":small,"bom-form-select--hide-label":hideLabel});var optionalProps={};if(statusMessage){optionalProps["aria-describedby"]="".concat(id,"_status")}return _react["default"].createElement("div",{className:classes},_react["default"].createElement(_Label["default"],{className:"bom-form-select__label",htmlFor:id,small:small,"data-testid":"bom-select-label"},label),_react["default"].createElement("select",(0,_extends2["default"])({id:id,className:"bom-form-select__input",ref:innerRef,"data-testid":"bom-select-input","aria-invalid":status===_types.Status.Error},optionalProps,restProps),children),statusMessage&&_react["default"].createElement(_Status["default"],{className:"bom-form-select__status",id:"".concat(id,"_status"),message:statusMessage,status:status,small:small}),helpText&&_react["default"].createElement(_Status["default"],{className:"bom-form-select__help",message:helpText,small:small}))}}]);return Select}(_react["default"].PureComponent);(0,_defineProperty2["default"])(Select,"defaultProps",{small:false,hideLabel:false});var SelectWithRef=_react["default"].forwardRef(function(props,ref){return _react["default"].createElement(Select,(0,_extends2["default"])({innerRef:ref},props))});SelectWithRef.displayName="Select";var _default=SelectWithRef;exports["default"]=_default; |
@@ -7,4 +7,4 @@ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf3=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _assertThisInitialized2=_interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _classnames=_interopRequireDefault(require("classnames"));var _react=_interopRequireDefault(require("react"));var _Label=_interopRequireDefault(require("../Label/Label"));var _Status=_interopRequireDefault(require("../Status/Status"));var _types=require("../../types.d");// istanbul ignore next (tricky to unit test, but covered in visual tests) | ||
if(multiLine&&autoHeight&&this.textareaRef.current){adjustHeight(this.textareaRef.current)}}},{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){var _this$props2=this.props,value=_this$props2.value,multiLine=_this$props2.multiLine,autoHeight=_this$props2.autoHeight;var previousValue=prevProps.value;// istanbul ignore next (tricky to unit test, but covered in visual tests) | ||
if(multiLine&&autoHeight&&this.textareaRef.current&&value!==previousValue){adjustHeight(this.textareaRef.current)}}},{key:"render",value:function render(){var _this2=this;var _ref=this.props,id=_ref.id,helpText=_ref.helpText,autoHeight=_ref.autoHeight,className=_ref.className,label=_ref.label,hideLabel=_ref.hideLabel,multiLine=_ref.multiLine,small=_ref.small,status=_ref.status,statusMessage=_ref.statusMessage,innerRef=_ref.innerRef,restProps=(0,_objectWithoutProperties2["default"])(_ref,["id","helpText","autoHeight","className","label","hideLabel","multiLine","small","status","statusMessage","innerRef"]);var classes=(0,_classnames["default"])(className,"bom-form-text",{"bom-form-text--error":status===_types.Status.Error,"bom-form-text--success":status===_types.Status.Success,"bom-form-text--small":small,"bom-form-text--hide-label":hideLabel});var Tag=multiLine?"textarea":"input";return _react["default"].createElement("div",{className:classes},_react["default"].createElement(_Label["default"],{className:"bom-form-text__label",htmlFor:id,small:small,"data-testid":"bom-text-label"},label),_react["default"].createElement(Tag,(0,_extends2["default"])({id:id,type:!multiLine?"text":undefined,className:"bom-form-text__input","data-testid":"bom-text-input",onInput:function onInput(e){// istanbul ignore next (tricky to unit test, but covered in visual tests) | ||
if(multiLine&&autoHeight&&this.textareaRef.current&&value!==previousValue){adjustHeight(this.textareaRef.current)}}},{key:"render",value:function render(){var _this2=this;var _ref=this.props,id=_ref.id,helpText=_ref.helpText,autoHeight=_ref.autoHeight,className=_ref.className,label=_ref.label,hideLabel=_ref.hideLabel,multiLine=_ref.multiLine,small=_ref.small,status=_ref.status,statusMessage=_ref.statusMessage,innerRef=_ref.innerRef,restProps=(0,_objectWithoutProperties2["default"])(_ref,["id","helpText","autoHeight","className","label","hideLabel","multiLine","small","status","statusMessage","innerRef"]);var classes=(0,_classnames["default"])(className,"bom-form-text",{"bom-form-text--error":status===_types.Status.Error,"bom-form-text--success":status===_types.Status.Success,"bom-form-text--small":small,"bom-form-text--hide-label":hideLabel});var optionalProps={};if(statusMessage){optionalProps["aria-describedby"]="".concat(id,"_status")}var Tag=multiLine?"textarea":"input";return _react["default"].createElement("div",{className:classes},_react["default"].createElement(_Label["default"],{className:"bom-form-text__label",htmlFor:id,small:small,"data-testid":"bom-text-label"},label),_react["default"].createElement(Tag,(0,_extends2["default"])({id:id,type:!multiLine?"text":undefined,className:"bom-form-text__input","data-testid":"bom-text-input",onInput:function onInput(e){// istanbul ignore next (tricky to unit test, but covered in visual tests) | ||
if(multiLine&&autoHeight&&_this2.textareaRef.current){adjustHeight(_this2.textareaRef.current)}// istanbul ignore next (tricky to unit test, but covered in visual tests) | ||
if(_this2.props.onInput&&typeof _this2.props.onInput==="function"){_this2.props.onInput(e)}},ref:this.textareaRef,"aria-invalid":status===_types.Status.Error},restProps)),statusMessage&&_react["default"].createElement(_Status["default"],{className:"bom-form-text__status",message:statusMessage,status:status,small:small}),helpText&&_react["default"].createElement(_Status["default"],{className:"bom-form-text__help",message:helpText,small:small}))}}]);return TextInput}(_react["default"].PureComponent);(0,_defineProperty2["default"])(TextInput,"defaultProps",{autoHeight:false,multiLine:false,small:false,hideLabel:false});var TextInputWithRef=_react["default"].forwardRef(function(props,ref){return _react["default"].createElement(TextInput,(0,_extends2["default"])({innerRef:ref},props))});TextInputWithRef.displayName="TextInput";var _default=TextInputWithRef;exports["default"]=_default; | ||
if(_this2.props.onInput&&typeof _this2.props.onInput==="function"){_this2.props.onInput(e)}},ref:this.textareaRef,"aria-invalid":status===_types.Status.Error},optionalProps,restProps)),statusMessage&&_react["default"].createElement(_Status["default"],{className:"bom-form-text__status",id:"".concat(id,"_status"),message:statusMessage,status:status,small:small}),helpText&&_react["default"].createElement(_Status["default"],{className:"bom-form-text__help",message:helpText,small:small}))}}]);return TextInput}(_react["default"].PureComponent);(0,_defineProperty2["default"])(TextInput,"defaultProps",{autoHeight:false,multiLine:false,small:false,hideLabel:false});var TextInputWithRef=_react["default"].forwardRef(function(props,ref){return _react["default"].createElement(TextInput,(0,_extends2["default"])({innerRef:ref},props))});TextInputWithRef.displayName="TextInput";var _default=TextInputWithRef;exports["default"]=_default; |
{ | ||
"name": "@ausbom/form", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "", | ||
@@ -41,7 +41,7 @@ "keywords": [], | ||
"dependencies": { | ||
"@ausbom/button": "^0.3.19", | ||
"@ausbom/icon": "^0.8.1", | ||
"@ausbom/button": "^0.3.20", | ||
"@ausbom/icon": "^0.8.2", | ||
"@ausbom/styles": "^0.8.0" | ||
}, | ||
"gitHead": "cd14fef5a1fcdc0716095b2045d0b230e71d9d8c" | ||
"gitHead": "59a1c1a3b82f7dfeb7215b4b21408e1d15b1862a" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
59726
Updated@ausbom/button@^0.3.20
Updated@ausbom/icon@^0.8.2