@ausbom/form
Advanced tools
Comparing version 0.4.5 to 0.4.6
@@ -6,2 +6,13 @@ # Change Log | ||
## [0.4.6](https://github.com/AusBOM/bom-design-system/compare/@ausbom/form@0.4.5...@ausbom/form@0.4.6) (2021-03-02) | ||
### Bug Fixes | ||
* added autofocus props to TextInput component to set focus when the component is rendered ([#357](https://github.com/AusBOM/bom-design-system/issues/357)) ([8786163](https://github.com/AusBOM/bom-design-system/commit/87861634d14ac0ff3057ea573345d6ae31b7f76c)) | ||
## [0.4.5](https://github.com/AusBOM/bom-design-system/compare/@ausbom/form@0.4.4...@ausbom/form@0.4.5) (2021-02-24) | ||
@@ -8,0 +19,0 @@ |
@@ -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 _icon=require("@ausbom/icon");var _Error=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/Error24"));var _Success=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/Success24"));var _Information=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/Information24"));var _WarningFilled=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/WarningFilled24"));var _classnames=_interopRequireDefault(require("classnames"));var _react=_interopRequireDefault(require("react"));var _status=_interopRequireDefault(require("../../status"));var _icons;var icons=(_icons={},(0,_defineProperty2["default"])(_icons,"".concat(_status["default"].Error),_Error["default"]),(0,_defineProperty2["default"])(_icons,"".concat(_status["default"].Success),_Success["default"]),(0,_defineProperty2["default"])(_icons,"".concat(_status["default"].Info),_Information["default"]),(0,_defineProperty2["default"])(_icons,"".concat(_status["default"].Failure),_Error["default"]),(0,_defineProperty2["default"])(_icons,"".concat(_status["default"].Warning),_WarningFilled["default"]),_icons);var Alert=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(Alert,_React$PureComponent);function Alert(){(0,_classCallCheck2["default"])(this,Alert);return(0,_possibleConstructorReturn2["default"])(this,(0,_getPrototypeOf2["default"])(Alert).apply(this,arguments))}(0,_createClass2["default"])(Alert,[{key:"render",value:function render(){var _ref=this.props,status=_ref.status,className=_ref.className,children=_ref.children,innerRef=_ref.innerRef,restProps=(0,_objectWithoutProperties2["default"])(_ref,["status","className","children","innerRef"]);var classes=(0,_classnames["default"])(className,"bom-form-alert",{"bom-form-alert--error":status===_status["default"].Error,"bom-form-alert--success":status===_status["default"].Success,"bom-form-alert--info":status===_status["default"].Info,"bom-form-alert--failure":status===_status["default"].Failure,"bom-form-alert--warning":status===_status["default"].Warning});var icon=icons[status];return _react["default"].createElement("div",(0,_extends2["default"])({className:classes,ref:innerRef},restProps),_react["default"].createElement("div",{className:"bom-form-alert__content"},icon&&_react["default"].createElement("div",{className:"bom-form-alert__content-icon"},_react["default"].createElement(_icon.SystemIcon,{icon:icon,size:24,"aria-hidden":true})),_react["default"].createElement("div",{className:"bom-form-alert__content-message"},children)))}}]);return Alert}(_react["default"].PureComponent);(0,_defineProperty2["default"])(Alert,"defaultProps",{});var AlertWithRef=_react["default"].forwardRef(function(props,ref){return _react["default"].createElement(Alert,(0,_extends2["default"])({innerRef:ref},props))});AlertWithRef.displayName="Alert";var _default=AlertWithRef;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 _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _icon=require("@ausbom/icon");var _Error=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/Error24"));var _Success=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/Success24"));var _Information=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/Information24"));var _WarningFilled=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/WarningFilled24"));var _classnames=_interopRequireDefault(require("classnames"));var _react=_interopRequireDefault(require("react"));var _status=_interopRequireDefault(require("../../status"));var _icons;function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return(0,_possibleConstructorReturn2["default"])(this,result)}}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}var icons=(_icons={},(0,_defineProperty2["default"])(_icons,"".concat(_status["default"].Error),_Error["default"]),(0,_defineProperty2["default"])(_icons,"".concat(_status["default"].Success),_Success["default"]),(0,_defineProperty2["default"])(_icons,"".concat(_status["default"].Info),_Information["default"]),(0,_defineProperty2["default"])(_icons,"".concat(_status["default"].Failure),_Error["default"]),(0,_defineProperty2["default"])(_icons,"".concat(_status["default"].Warning),_WarningFilled["default"]),_icons);var Alert=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(Alert,_React$PureComponent);var _super=_createSuper(Alert);function Alert(){(0,_classCallCheck2["default"])(this,Alert);return _super.apply(this,arguments)}(0,_createClass2["default"])(Alert,[{key:"render",value:function render(){var _ref=this.props,status=_ref.status,className=_ref.className,children=_ref.children,innerRef=_ref.innerRef,restProps=(0,_objectWithoutProperties2["default"])(_ref,["status","className","children","innerRef"]);var classes=(0,_classnames["default"])(className,"bom-form-alert",{"bom-form-alert--error":status===_status["default"].Error,"bom-form-alert--success":status===_status["default"].Success,"bom-form-alert--info":status===_status["default"].Info,"bom-form-alert--failure":status===_status["default"].Failure,"bom-form-alert--warning":status===_status["default"].Warning});var icon=icons[status];return/*#__PURE__*/_react["default"].createElement("div",(0,_extends2["default"])({className:classes,ref:innerRef},restProps),/*#__PURE__*/_react["default"].createElement("div",{className:"bom-form-alert__content"},icon&&/*#__PURE__*/_react["default"].createElement("div",{className:"bom-form-alert__content-icon"},/*#__PURE__*/_react["default"].createElement(_icon.SystemIcon,{icon:icon,size:24,"aria-hidden":true})),/*#__PURE__*/_react["default"].createElement("div",{className:"bom-form-alert__content-message"},children)))}}]);return Alert}(_react["default"].PureComponent);(0,_defineProperty2["default"])(Alert,"defaultProps",{});var AlertWithRef=/*#__PURE__*/_react["default"].forwardRef(function(props,ref){return/*#__PURE__*/_react["default"].createElement(Alert,(0,_extends2["default"])({innerRef:ref},props))});AlertWithRef.displayName="Alert";var _default=AlertWithRef;exports["default"]=_default; |
@@ -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 _icon=require("@ausbom/icon");var _CheckboxTick=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/CheckboxTick24"));var _CheckboxUntick=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/CheckboxUntick24"));var _classnames=_interopRequireDefault(require("classnames"));var _react=_interopRequireDefault(require("react"));var Checkbox=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(Checkbox,_React$PureComponent);function Checkbox(){(0,_classCallCheck2["default"])(this,Checkbox);return(0,_possibleConstructorReturn2["default"])(this,(0,_getPrototypeOf2["default"])(Checkbox).apply(this,arguments))}(0,_createClass2["default"])(Checkbox,[{key:"render",value:function render(){var _ref=this.props,id=_ref.id,className=_ref.className,innerRef=_ref.innerRef,label=_ref.label,restProps=(0,_objectWithoutProperties2["default"])(_ref,["id","className","innerRef","label"]);return _react["default"].createElement("div",{className:(0,_classnames["default"])("bom-form-checkbox",className)},_react["default"].createElement("input",(0,_extends2["default"])({className:"bom-form-checkbox__input","data-testid":"bom-checkbox-input",id:id,type:"checkbox",ref:innerRef},restProps)),_react["default"].createElement("label",{className:"bom-form-checkbox__label","data-testid":"bom-checkbox-label",htmlFor:id},_react["default"].createElement("span",{className:"bom-form-checkbox-focus"},_react["default"].createElement(_icon.SystemIcon,{"aria-hidden":true,className:"bom-form-checkbox-icon bom-form-checkbox-icon--checked",icon:_CheckboxTick["default"],size:24}),_react["default"].createElement(_icon.SystemIcon,{"aria-hidden":true,className:"bom-form-checkbox-icon bom-form-checkbox-icon--unchecked",icon:_CheckboxUntick["default"],size:24})),_react["default"].createElement("span",{className:"bom-form-checkbox__label-text"},label)))}}]);return Checkbox}(_react["default"].PureComponent);(0,_defineProperty2["default"])(Checkbox,"defaultProps",{});var CheckboxWithRef=_react["default"].forwardRef(function(props,ref){return _react["default"].createElement(Checkbox,(0,_extends2["default"])({innerRef:ref},props))});CheckboxWithRef.displayName="Checkbox";var _default=CheckboxWithRef;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 _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _icon=require("@ausbom/icon");var _CheckboxTick=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/CheckboxTick24"));var _CheckboxUntick=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/CheckboxUntick24"));var _classnames=_interopRequireDefault(require("classnames"));var _react=_interopRequireDefault(require("react"));function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return(0,_possibleConstructorReturn2["default"])(this,result)}}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}var Checkbox=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(Checkbox,_React$PureComponent);var _super=_createSuper(Checkbox);function Checkbox(){(0,_classCallCheck2["default"])(this,Checkbox);return _super.apply(this,arguments)}(0,_createClass2["default"])(Checkbox,[{key:"render",value:function render(){var _ref=this.props,id=_ref.id,className=_ref.className,innerRef=_ref.innerRef,label=_ref.label,restProps=(0,_objectWithoutProperties2["default"])(_ref,["id","className","innerRef","label"]);return/*#__PURE__*/_react["default"].createElement("div",{className:(0,_classnames["default"])("bom-form-checkbox",className)},/*#__PURE__*/_react["default"].createElement("input",(0,_extends2["default"])({className:"bom-form-checkbox__input","data-testid":"bom-checkbox-input",id:id,type:"checkbox",ref:innerRef},restProps)),/*#__PURE__*/_react["default"].createElement("label",{className:"bom-form-checkbox__label","data-testid":"bom-checkbox-label",htmlFor:id},/*#__PURE__*/_react["default"].createElement("span",{className:"bom-form-checkbox-focus"},/*#__PURE__*/_react["default"].createElement(_icon.SystemIcon,{"aria-hidden":true,className:"bom-form-checkbox-icon bom-form-checkbox-icon--checked",icon:_CheckboxTick["default"],size:24}),/*#__PURE__*/_react["default"].createElement(_icon.SystemIcon,{"aria-hidden":true,className:"bom-form-checkbox-icon bom-form-checkbox-icon--unchecked",icon:_CheckboxUntick["default"],size:24})),/*#__PURE__*/_react["default"].createElement("span",{className:"bom-form-checkbox__label-text"},label)))}}]);return Checkbox}(_react["default"].PureComponent);(0,_defineProperty2["default"])(Checkbox,"defaultProps",{});var CheckboxWithRef=/*#__PURE__*/_react["default"].forwardRef(function(props,ref){return/*#__PURE__*/_react["default"].createElement(Checkbox,(0,_extends2["default"])({innerRef:ref},props))});CheckboxWithRef.displayName="Checkbox";var _default=CheckboxWithRef;exports["default"]=_default; |
@@ -1,1 +0,1 @@ | ||
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=exports.Choicebox=void 0;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 _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _classnames=_interopRequireDefault(require("classnames"));var _react=_interopRequireDefault(require("react"));var ChoiceboxNoRef=function ChoiceboxNoRef(_ref){var id=_ref.id,className=_ref.className,innerRef=_ref.innerRef,label=_ref.label,_ref$type=_ref.type,type=_ref$type===void 0?"checkbox":_ref$type,restProps=(0,_objectWithoutProperties2["default"])(_ref,["id","className","innerRef","label","type"]);return _react["default"].createElement("div",{className:(0,_classnames["default"])("bom-form-choicebox",className)},_react["default"].createElement("input",(0,_extends2["default"])({className:"bom-form-choicebox__input","data-testid":"bom-choicebox-input",id:id,type:type,ref:innerRef},restProps)),_react["default"].createElement("label",{className:"bom-form-choicebox__label","data-testid":"bom-choicebox-label",htmlFor:id},label))};var Choicebox=_react["default"].forwardRef(function(props,ref){return _react["default"].createElement(ChoiceboxNoRef,(0,_extends2["default"])({innerRef:ref},props))});exports.Choicebox=Choicebox;Choicebox.displayName="Choicebox";var Choiceboxes=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(Choiceboxes,_React$PureComponent);function Choiceboxes(){(0,_classCallCheck2["default"])(this,Choiceboxes);return(0,_possibleConstructorReturn2["default"])(this,(0,_getPrototypeOf2["default"])(Choiceboxes).apply(this,arguments))}(0,_createClass2["default"])(Choiceboxes,[{key:"render",value:function render(){var _ref2=this.props,a11yLabel=_ref2.a11yLabel,children=_ref2.children,className=_ref2.className,innerRef=_ref2.innerRef,restProps=(0,_objectWithoutProperties2["default"])(_ref2,["a11yLabel","children","className","innerRef"]);return _react["default"].createElement("fieldset",(0,_extends2["default"])({ref:innerRef,className:(0,_classnames["default"])("bom-form-choiceboxes",className)},restProps),_react["default"].createElement("legend",{className:"bom-form-choiceboxes__legend"},a11yLabel),_react["default"].createElement("div",{className:"bom-form-choiceboxes__choices"},children))}}]);return Choiceboxes}(_react["default"].PureComponent);(0,_defineProperty2["default"])(Choiceboxes,"defaultProps",{});var ChoiceboxesWithRef=_react["default"].forwardRef(function(props,ref){return _react["default"].createElement(Choiceboxes,(0,_extends2["default"])({innerRef:ref},props))});ChoiceboxesWithRef.displayName="Choiceboxes";var _default=ChoiceboxesWithRef;exports["default"]=_default; | ||
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=exports.Choicebox=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _classnames=_interopRequireDefault(require("classnames"));var _react=_interopRequireDefault(require("react"));function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return(0,_possibleConstructorReturn2["default"])(this,result)}}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}var ChoiceboxNoRef=function ChoiceboxNoRef(_ref){var id=_ref.id,className=_ref.className,innerRef=_ref.innerRef,label=_ref.label,_ref$type=_ref.type,type=_ref$type===void 0?"checkbox":_ref$type,restProps=(0,_objectWithoutProperties2["default"])(_ref,["id","className","innerRef","label","type"]);return/*#__PURE__*/_react["default"].createElement("div",{className:(0,_classnames["default"])("bom-form-choicebox",className)},/*#__PURE__*/_react["default"].createElement("input",(0,_extends2["default"])({className:"bom-form-choicebox__input","data-testid":"bom-choicebox-input",id:id,type:type,ref:innerRef},restProps)),/*#__PURE__*/_react["default"].createElement("label",{className:"bom-form-choicebox__label","data-testid":"bom-choicebox-label",htmlFor:id},label))};var Choicebox=/*#__PURE__*/_react["default"].forwardRef(function(props,ref){return/*#__PURE__*/_react["default"].createElement(ChoiceboxNoRef,(0,_extends2["default"])({innerRef:ref},props))});exports.Choicebox=Choicebox;Choicebox.displayName="Choicebox";var Choiceboxes=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(Choiceboxes,_React$PureComponent);var _super=_createSuper(Choiceboxes);function Choiceboxes(){(0,_classCallCheck2["default"])(this,Choiceboxes);return _super.apply(this,arguments)}(0,_createClass2["default"])(Choiceboxes,[{key:"render",value:function render(){var _ref2=this.props,a11yLabel=_ref2.a11yLabel,children=_ref2.children,className=_ref2.className,innerRef=_ref2.innerRef,restProps=(0,_objectWithoutProperties2["default"])(_ref2,["a11yLabel","children","className","innerRef"]);return/*#__PURE__*/_react["default"].createElement("fieldset",(0,_extends2["default"])({ref:innerRef,className:(0,_classnames["default"])("bom-form-choiceboxes",className)},restProps),/*#__PURE__*/_react["default"].createElement("legend",{className:"bom-form-choiceboxes__legend"},a11yLabel),/*#__PURE__*/_react["default"].createElement("div",{className:"bom-form-choiceboxes__choices"},children))}}]);return Choiceboxes}(_react["default"].PureComponent);(0,_defineProperty2["default"])(Choiceboxes,"defaultProps",{});var ChoiceboxesWithRef=/*#__PURE__*/_react["default"].forwardRef(function(props,ref){return/*#__PURE__*/_react["default"].createElement(Choiceboxes,(0,_extends2["default"])({innerRef:ref},props))});ChoiceboxesWithRef.displayName="Choiceboxes";var _default=ChoiceboxesWithRef;exports["default"]=_default; |
@@ -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 Control=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(Control,_React$PureComponent);function Control(){(0,_classCallCheck2["default"])(this,Control);return(0,_possibleConstructorReturn2["default"])(this,(0,_getPrototypeOf2["default"])(Control).apply(this,arguments))}(0,_createClass2["default"])(Control,[{key:"render",value:function render(){var _ref=this.props,className=_ref.className,innerRef=_ref.innerRef,children=_ref.children,restProps=(0,_objectWithoutProperties2["default"])(_ref,["className","innerRef","children"]);return _react["default"].createElement("div",(0,_extends2["default"])({ref:innerRef,className:(0,_classnames["default"])("bom-form-control",className)},restProps),children)}}]);return Control}(_react["default"].PureComponent);(0,_defineProperty2["default"])(Control,"defaultProps",{});var ControlWithRef=_react["default"].forwardRef(function(props,ref){return _react["default"].createElement(Control,(0,_extends2["default"])({innerRef:ref},props))});ControlWithRef.displayName="Control";var _default=ControlWithRef;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 _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _classnames=_interopRequireDefault(require("classnames"));var _react=_interopRequireDefault(require("react"));function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return(0,_possibleConstructorReturn2["default"])(this,result)}}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}var Control=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(Control,_React$PureComponent);var _super=_createSuper(Control);function Control(){(0,_classCallCheck2["default"])(this,Control);return _super.apply(this,arguments)}(0,_createClass2["default"])(Control,[{key:"render",value:function render(){var _ref=this.props,className=_ref.className,innerRef=_ref.innerRef,children=_ref.children,restProps=(0,_objectWithoutProperties2["default"])(_ref,["className","innerRef","children"]);return/*#__PURE__*/_react["default"].createElement("div",(0,_extends2["default"])({ref:innerRef,className:(0,_classnames["default"])("bom-form-control",className)},restProps),children)}}]);return Control}(_react["default"].PureComponent);(0,_defineProperty2["default"])(Control,"defaultProps",{});var ControlWithRef=/*#__PURE__*/_react["default"].forwardRef(function(props,ref){return/*#__PURE__*/_react["default"].createElement(Control,(0,_extends2["default"])({innerRef:ref},props))});ControlWithRef.displayName="Control";var _default=ControlWithRef;exports["default"]=_default; |
@@ -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=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(Label,_React$PureComponent);function Label(){(0,_classCallCheck2["default"])(this,Label);return(0,_possibleConstructorReturn2["default"])(this,(0,_getPrototypeOf2["default"])(Label).apply(this,arguments))}(0,_createClass2["default"])(Label,[{key:"render",value:function render(){var _ref=this.props,className=_ref.className,innerRef=_ref.innerRef,small=_ref.small,Tag=_ref.as,restProps=(0,_objectWithoutProperties2["default"])(_ref,["className","innerRef","small","as"]);var classes=(0,_classnames["default"])(className,"bom-form-label",{"bom-form-label--small":small});return _react["default"].createElement(Tag,(0,_extends2["default"])({className:classes,ref:innerRef},restProps))}}]);return Label}(_react["default"].PureComponent);(0,_defineProperty2["default"])(Label,"defaultProps",{as:"label",small:false});var LabelWithRef=_react["default"].forwardRef(function(props,ref){return _react["default"].createElement(Label,(0,_extends2["default"])({innerRef:ref},props))});LabelWithRef.displayName="Label";var _default=LabelWithRef;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 _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _classnames=_interopRequireDefault(require("classnames"));var _react=_interopRequireDefault(require("react"));function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return(0,_possibleConstructorReturn2["default"])(this,result)}}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}var Label=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(Label,_React$PureComponent);var _super=_createSuper(Label);function Label(){(0,_classCallCheck2["default"])(this,Label);return _super.apply(this,arguments)}(0,_createClass2["default"])(Label,[{key:"render",value:function render(){var _ref=this.props,className=_ref.className,innerRef=_ref.innerRef,small=_ref.small,Tag=_ref.as,restProps=(0,_objectWithoutProperties2["default"])(_ref,["className","innerRef","small","as"]);var classes=(0,_classnames["default"])(className,"bom-form-label",{"bom-form-label--small":small});return/*#__PURE__*/_react["default"].createElement(Tag,(0,_extends2["default"])({className:classes,ref:innerRef},restProps))}}]);return Label}(_react["default"].PureComponent);(0,_defineProperty2["default"])(Label,"defaultProps",{as:"label",small:false});var LabelWithRef=/*#__PURE__*/_react["default"].forwardRef(function(props,ref){return/*#__PURE__*/_react["default"].createElement(Label,(0,_extends2["default"])({innerRef:ref},props))});LabelWithRef.displayName="Label";var _default=LabelWithRef;exports["default"]=_default; |
@@ -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 OptionGroup=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(OptionGroup,_React$PureComponent);function OptionGroup(){(0,_classCallCheck2["default"])(this,OptionGroup);return(0,_possibleConstructorReturn2["default"])(this,(0,_getPrototypeOf2["default"])(OptionGroup).apply(this,arguments))}(0,_createClass2["default"])(OptionGroup,[{key:"render",value:function render(){var _ref=this.props,label=_ref.label,children=_ref.children,className=_ref.className,innerRef=_ref.innerRef,restProps=(0,_objectWithoutProperties2["default"])(_ref,["label","children","className","innerRef"]);return _react["default"].createElement("fieldset",(0,_extends2["default"])({ref:innerRef,className:(0,_classnames["default"])("bom-form-option-group",className)},restProps),_react["default"].createElement(_Label["default"],{as:"legend"},label),_react["default"].createElement("div",{className:"bom-form-option-group__items"},_react["default"].Children.map(children,function(child){return _react["default"].createElement("div",{className:"bom-form-option-group-item"},child)})))}}]);return OptionGroup}(_react["default"].PureComponent);(0,_defineProperty2["default"])(OptionGroup,"defaultProps",{});var OptionGroupWithRef=_react["default"].forwardRef(function(props,ref){return _react["default"].createElement(OptionGroup,(0,_extends2["default"])({innerRef:ref},props))});OptionGroupWithRef.displayName="OptionGroup";var _default=OptionGroupWithRef;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 _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _classnames=_interopRequireDefault(require("classnames"));var _react=_interopRequireDefault(require("react"));var _Label=_interopRequireDefault(require("../Label/Label"));function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return(0,_possibleConstructorReturn2["default"])(this,result)}}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}var OptionGroup=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(OptionGroup,_React$PureComponent);var _super=_createSuper(OptionGroup);function OptionGroup(){(0,_classCallCheck2["default"])(this,OptionGroup);return _super.apply(this,arguments)}(0,_createClass2["default"])(OptionGroup,[{key:"render",value:function render(){var _ref=this.props,label=_ref.label,children=_ref.children,className=_ref.className,innerRef=_ref.innerRef,restProps=(0,_objectWithoutProperties2["default"])(_ref,["label","children","className","innerRef"]);return/*#__PURE__*/_react["default"].createElement("fieldset",(0,_extends2["default"])({ref:innerRef,className:(0,_classnames["default"])("bom-form-option-group",className)},restProps),/*#__PURE__*/_react["default"].createElement(_Label["default"],{as:"legend"},label),/*#__PURE__*/_react["default"].createElement("div",{className:"bom-form-option-group__items"},_react["default"].Children.map(children,function(child){return/*#__PURE__*/_react["default"].createElement("div",{className:"bom-form-option-group-item"},child)})))}}]);return OptionGroup}(_react["default"].PureComponent);(0,_defineProperty2["default"])(OptionGroup,"defaultProps",{});var OptionGroupWithRef=/*#__PURE__*/_react["default"].forwardRef(function(props,ref){return/*#__PURE__*/_react["default"].createElement(OptionGroup,(0,_extends2["default"])({innerRef:ref},props))});OptionGroupWithRef.displayName="OptionGroup";var _default=OptionGroupWithRef;exports["default"]=_default; |
@@ -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 _icon=require("@ausbom/icon");var _RadioSelected=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/RadioSelected24"));var _RadioUnselected=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/RadioUnselected24"));var _classnames=_interopRequireDefault(require("classnames"));var _react=_interopRequireDefault(require("react"));var Radio=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(Radio,_React$PureComponent);function Radio(){(0,_classCallCheck2["default"])(this,Radio);return(0,_possibleConstructorReturn2["default"])(this,(0,_getPrototypeOf2["default"])(Radio).apply(this,arguments))}(0,_createClass2["default"])(Radio,[{key:"render",value:function render(){var _ref=this.props,id=_ref.id,className=_ref.className,innerRef=_ref.innerRef,label=_ref.label,restProps=(0,_objectWithoutProperties2["default"])(_ref,["id","className","innerRef","label"]);var classes=(0,_classnames["default"])(className,"bom-form-radio");return _react["default"].createElement("div",{className:classes},_react["default"].createElement("input",(0,_extends2["default"])({className:"bom-form-radio__input","data-testid":"bom-radio-input",id:id,type:"radio",ref:innerRef},restProps)),_react["default"].createElement("label",{className:"bom-form-radio__label","data-testid":"bom-radio-label",htmlFor:id},_react["default"].createElement("span",{className:"bom-form-radio-focus"},_react["default"].createElement(_icon.SystemIcon,{"aria-hidden":true,className:"bom-form-radio-icon bom-form-radio-icon--checked",icon:_RadioSelected["default"],size:24}),_react["default"].createElement(_icon.SystemIcon,{"aria-hidden":true,className:"bom-form-radio-icon bom-form-radio-icon--unchecked",icon:_RadioUnselected["default"],size:24})),_react["default"].createElement("span",{className:"bom-form-radio__label-text"},label)))}}]);return Radio}(_react["default"].PureComponent);(0,_defineProperty2["default"])(Radio,"defaultProps",{});var RadioWithRef=_react["default"].forwardRef(function(props,ref){return _react["default"].createElement(Radio,(0,_extends2["default"])({innerRef:ref},props))});RadioWithRef.displayName="Radio";var _default=RadioWithRef;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 _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _icon=require("@ausbom/icon");var _RadioSelected=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/RadioSelected24"));var _RadioUnselected=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/RadioUnselected24"));var _classnames=_interopRequireDefault(require("classnames"));var _react=_interopRequireDefault(require("react"));function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return(0,_possibleConstructorReturn2["default"])(this,result)}}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}var Radio=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(Radio,_React$PureComponent);var _super=_createSuper(Radio);function Radio(){(0,_classCallCheck2["default"])(this,Radio);return _super.apply(this,arguments)}(0,_createClass2["default"])(Radio,[{key:"render",value:function render(){var _ref=this.props,id=_ref.id,className=_ref.className,innerRef=_ref.innerRef,label=_ref.label,restProps=(0,_objectWithoutProperties2["default"])(_ref,["id","className","innerRef","label"]);var classes=(0,_classnames["default"])(className,"bom-form-radio");return/*#__PURE__*/_react["default"].createElement("div",{className:classes},/*#__PURE__*/_react["default"].createElement("input",(0,_extends2["default"])({className:"bom-form-radio__input","data-testid":"bom-radio-input",id:id,type:"radio",ref:innerRef},restProps)),/*#__PURE__*/_react["default"].createElement("label",{className:"bom-form-radio__label","data-testid":"bom-radio-label",htmlFor:id},/*#__PURE__*/_react["default"].createElement("span",{className:"bom-form-radio-focus"},/*#__PURE__*/_react["default"].createElement(_icon.SystemIcon,{"aria-hidden":true,className:"bom-form-radio-icon bom-form-radio-icon--checked",icon:_RadioSelected["default"],size:24}),/*#__PURE__*/_react["default"].createElement(_icon.SystemIcon,{"aria-hidden":true,className:"bom-form-radio-icon bom-form-radio-icon--unchecked",icon:_RadioUnselected["default"],size:24})),/*#__PURE__*/_react["default"].createElement("span",{className:"bom-form-radio__label-text"},label)))}}]);return Radio}(_react["default"].PureComponent);(0,_defineProperty2["default"])(Radio,"defaultProps",{});var RadioWithRef=/*#__PURE__*/_react["default"].forwardRef(function(props,ref){return/*#__PURE__*/_react["default"].createElement(Radio,(0,_extends2["default"])({innerRef:ref},props))});RadioWithRef.displayName="Radio";var _default=RadioWithRef;exports["default"]=_default; |
@@ -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 _status=_interopRequireDefault(require("../../status"));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===_status["default"].Error,"bom-form-select--success":status===_status["default"].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===_status["default"].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; | ||
"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 _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));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 _status=_interopRequireDefault(require("../../status"));function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return(0,_possibleConstructorReturn2["default"])(this,result)}}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}var Select=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(Select,_React$PureComponent);var _super=_createSuper(Select);function Select(){(0,_classCallCheck2["default"])(this,Select);return _super.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===_status["default"].Error,"bom-form-select--success":status===_status["default"].Success,"bom-form-select--small":small,"bom-form-select--hide-label":hideLabel});var optionalProps={};if(statusMessage){optionalProps["aria-describedby"]="".concat(id,"_status")}return/*#__PURE__*/_react["default"].createElement("div",{className:classes},/*#__PURE__*/_react["default"].createElement(_Label["default"],{className:"bom-form-select__label",htmlFor:id,small:small,"data-testid":"bom-select-label"},label),/*#__PURE__*/_react["default"].createElement("select",(0,_extends2["default"])({id:id,className:"bom-form-select__input",ref:innerRef,"data-testid":"bom-select-input","aria-invalid":status===_status["default"].Error},optionalProps,restProps),children),statusMessage&&/*#__PURE__*/_react["default"].createElement(_Status["default"],{className:"bom-form-select__status",id:"".concat(id,"_status"),message:statusMessage,status:status,small:small}),helpText&&/*#__PURE__*/_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=/*#__PURE__*/_react["default"].forwardRef(function(props,ref){return/*#__PURE__*/_react["default"].createElement(Select,(0,_extends2["default"])({innerRef:ref},props))});SelectWithRef.displayName="Select";var _default=SelectWithRef;exports["default"]=_default; |
@@ -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 _icon=require("@ausbom/icon");var _Error=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/Error16"));var _Tick=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/Tick16"));var _classnames=_interopRequireDefault(require("classnames"));var _react=_interopRequireDefault(require("react"));var _status=_interopRequireDefault(require("../../status"));var Status=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(Status,_React$PureComponent);function Status(){(0,_classCallCheck2["default"])(this,Status);return(0,_possibleConstructorReturn2["default"])(this,(0,_getPrototypeOf2["default"])(Status).apply(this,arguments))}(0,_createClass2["default"])(Status,[{key:"render",value:function render(){var _ref=this.props,className=_ref.className,overrideIcon=_ref.icon,innerRef=_ref.innerRef,message=_ref.message,small=_ref.small,status=_ref.status,restProps=(0,_objectWithoutProperties2["default"])(_ref,["className","icon","innerRef","message","small","status"]);var classes=(0,_classnames["default"])(className,"bom-form-status",{"bom-form-status--error":status===_status["default"].Error,"bom-form-status--success":status===_status["default"].Success,"bom-form-status--small":small});var icon=overrideIcon;if(!icon){switch(status){case _status["default"].Error:icon=_Error["default"];break;case _status["default"].Success:icon=_Tick["default"];break;default:break;}}return _react["default"].createElement("div",(0,_extends2["default"])({className:classes,ref:innerRef},restProps),icon&&_react["default"].createElement("div",{className:"bom-form-status__icon"},_react["default"].createElement(_icon.SystemIcon,{"aria-hidden":true,icon:icon,size:16})),message&&_react["default"].createElement("div",{className:"bom-form-status__text"},message))}}]);return Status}(_react["default"].PureComponent);(0,_defineProperty2["default"])(Status,"defaultProps",{});var StatusWithRef=_react["default"].forwardRef(function(props,ref){return _react["default"].createElement(Status,(0,_extends2["default"])({innerRef:ref},props))});StatusWithRef.displayName="Status";var _default=StatusWithRef;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 _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _icon=require("@ausbom/icon");var _Error=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/Error16"));var _Tick=_interopRequireDefault(require("@ausbom/icon/lib/icons/system/Tick16"));var _classnames=_interopRequireDefault(require("classnames"));var _react=_interopRequireDefault(require("react"));var _status=_interopRequireDefault(require("../../status"));function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return(0,_possibleConstructorReturn2["default"])(this,result)}}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}var Status=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(Status,_React$PureComponent);var _super=_createSuper(Status);function Status(){(0,_classCallCheck2["default"])(this,Status);return _super.apply(this,arguments)}(0,_createClass2["default"])(Status,[{key:"render",value:function render(){var _ref=this.props,className=_ref.className,overrideIcon=_ref.icon,innerRef=_ref.innerRef,message=_ref.message,small=_ref.small,status=_ref.status,restProps=(0,_objectWithoutProperties2["default"])(_ref,["className","icon","innerRef","message","small","status"]);var classes=(0,_classnames["default"])(className,"bom-form-status",{"bom-form-status--error":status===_status["default"].Error,"bom-form-status--success":status===_status["default"].Success,"bom-form-status--small":small});var icon=overrideIcon;if(!icon){switch(status){case _status["default"].Error:icon=_Error["default"];break;case _status["default"].Success:icon=_Tick["default"];break;default:break;}}return/*#__PURE__*/_react["default"].createElement("div",(0,_extends2["default"])({className:classes,ref:innerRef},restProps),icon&&/*#__PURE__*/_react["default"].createElement("div",{className:"bom-form-status__icon"},/*#__PURE__*/_react["default"].createElement(_icon.SystemIcon,{"aria-hidden":true,icon:icon,size:16})),message&&/*#__PURE__*/_react["default"].createElement("div",{className:"bom-form-status__text"},message))}}]);return Status}(_react["default"].PureComponent);(0,_defineProperty2["default"])(Status,"defaultProps",{});var StatusWithRef=/*#__PURE__*/_react["default"].forwardRef(function(props,ref){return/*#__PURE__*/_react["default"].createElement(Status,(0,_extends2["default"])({innerRef:ref},props))});StatusWithRef.displayName="Status";var _default=StatusWithRef;exports["default"]=_default; |
@@ -9,2 +9,3 @@ import React from 'react' | ||
small?: boolean | ||
autoFocus?: boolean | ||
multiLine?: boolean | ||
@@ -11,0 +12,0 @@ autoHeight?: boolean |
@@ -1,9 +0,10 @@ | ||
"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 _status=_interopRequireDefault(require("../../status"));// istanbul ignore next (tricky to unit test, but covered in visual tests) | ||
"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 _assertThisInitialized2=_interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));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 _status=_interopRequireDefault(require("../../status"));function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return(0,_possibleConstructorReturn2["default"])(this,result)}}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}// istanbul ignore next (tricky to unit test, but covered in visual tests) | ||
var adjustHeight=function adjustHeight(el){var computed=window.getComputedStyle(el);el.style.height="auto";// eslint-disable-line no-param-reassign | ||
var scrollHeight=parseInt(el.scrollHeight,10);var height=parseInt(computed.getPropertyValue("height"),10);el.style.height=height;// eslint-disable-line no-param-reassign | ||
el.style.height="".concat(scrollHeight,"px");// eslint-disable-line no-param-reassign | ||
};var TextInput=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(TextInput,_React$PureComponent);function TextInput(){var _getPrototypeOf2;var _this;(0,_classCallCheck2["default"])(this,TextInput);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}_this=(0,_possibleConstructorReturn2["default"])(this,(_getPrototypeOf2=(0,_getPrototypeOf3["default"])(TextInput)).call.apply(_getPrototypeOf2,[this].concat(args)));(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"textareaRef",_this.props.innerRef||_react["default"].createRef());return _this}(0,_createClass2["default"])(TextInput,[{key:"componentDidMount",value:function componentDidMount(){var _this$props=this.props,multiLine=_this$props.multiLine,autoHeight=_this$props.autoHeight;// 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===_status["default"].Error,"bom-form-text--success":status===_status["default"].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===_status["default"].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; | ||
};var TextInput=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(TextInput,_React$PureComponent);var _super=_createSuper(TextInput);function TextInput(){var _this;(0,_classCallCheck2["default"])(this,TextInput);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}_this=_super.call.apply(_super,[this].concat(args));(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"textareaRef",_this.props.innerRef||/*#__PURE__*/_react["default"].createRef());return _this}(0,_createClass2["default"])(TextInput,[{key:"componentDidMount",value:function componentDidMount(){var _this2=this;var _this$props=this.props,multiLine=_this$props.multiLine,autoHeight=_this$props.autoHeight;// istanbul ignore next (tricky to unit test, but covered in visual tests) | ||
if(multiLine&&autoHeight&&this.textareaRef.current){adjustHeight(this.textareaRef.current)}if(this.props.autoFocus){// This is required to make sure that the focus is set to the input when used inside the modal | ||
setTimeout(function(){_this2.textareaRef.current.focus()},50)}}},{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 _this3=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===_status["default"].Error,"bom-form-text--success":status===_status["default"].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/*#__PURE__*/_react["default"].createElement("div",{className:classes},/*#__PURE__*/_react["default"].createElement(_Label["default"],{className:"bom-form-text__label",htmlFor:id,small:small,"data-testid":"bom-text-label"},label),/*#__PURE__*/_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&&_this3.textareaRef.current){adjustHeight(_this3.textareaRef.current)}// istanbul ignore next (tricky to unit test, but covered in visual tests) | ||
if(_this3.props.onInput&&typeof _this3.props.onInput==="function"){_this3.props.onInput(e)}},ref:this.textareaRef,"aria-invalid":status===_status["default"].Error},optionalProps,restProps)),statusMessage&&/*#__PURE__*/_react["default"].createElement(_Status["default"],{className:"bom-form-text__status",id:"".concat(id,"_status"),message:statusMessage,status:status,small:small}),helpText&&/*#__PURE__*/_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,autoFocus:false});var TextInputWithRef=/*#__PURE__*/_react["default"].forwardRef(function(props,ref){return/*#__PURE__*/_react["default"].createElement(TextInput,(0,_extends2["default"])({innerRef:ref},props))});TextInputWithRef.displayName="TextInput";var _default=TextInputWithRef;exports["default"]=_default; |
@@ -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 Toggle=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(Toggle,_React$PureComponent);function Toggle(){(0,_classCallCheck2["default"])(this,Toggle);return(0,_possibleConstructorReturn2["default"])(this,(0,_getPrototypeOf2["default"])(Toggle).apply(this,arguments))}(0,_createClass2["default"])(Toggle,[{key:"render",value:function render(){var _ref=this.props,id=_ref.id,className=_ref.className,innerRef=_ref.innerRef,label=_ref.label,restProps=(0,_objectWithoutProperties2["default"])(_ref,["id","className","innerRef","label"]);return _react["default"].createElement("div",{className:(0,_classnames["default"])("bom-form-toggle",className)},_react["default"].createElement("input",(0,_extends2["default"])({className:"bom-form-toggle__input","data-testid":"bom-toggle-input",id:id,type:"checkbox",ref:innerRef},restProps)),_react["default"].createElement("label",{className:"bom-form-toggle__label","data-testid":"bom-toggle-label",htmlFor:id},_react["default"].createElement("span",{"aria-hidden":"true",className:"bom-form-toggle-focus"},_react["default"].createElement("span",{className:"bom-form-toggle-track"},_react["default"].createElement("span",{className:"bom-form-toggle-thumb"}))),_react["default"].createElement("span",{className:"bom-form-toggle__label-text"},label)))}}]);return Toggle}(_react["default"].PureComponent);(0,_defineProperty2["default"])(Toggle,"defaultProps",{});var ToggleWithRef=_react["default"].forwardRef(function(props,ref){return _react["default"].createElement(Toggle,(0,_extends2["default"])({innerRef:ref},props))});ToggleWithRef.displayName="Toggle";var _default=ToggleWithRef;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 _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _classnames=_interopRequireDefault(require("classnames"));var _react=_interopRequireDefault(require("react"));function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return(0,_possibleConstructorReturn2["default"])(this,result)}}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}var Toggle=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(Toggle,_React$PureComponent);var _super=_createSuper(Toggle);function Toggle(){(0,_classCallCheck2["default"])(this,Toggle);return _super.apply(this,arguments)}(0,_createClass2["default"])(Toggle,[{key:"render",value:function render(){var _ref=this.props,id=_ref.id,className=_ref.className,innerRef=_ref.innerRef,label=_ref.label,restProps=(0,_objectWithoutProperties2["default"])(_ref,["id","className","innerRef","label"]);return/*#__PURE__*/_react["default"].createElement("div",{className:(0,_classnames["default"])("bom-form-toggle",className)},/*#__PURE__*/_react["default"].createElement("input",(0,_extends2["default"])({className:"bom-form-toggle__input","data-testid":"bom-toggle-input",id:id,type:"checkbox",ref:innerRef},restProps)),/*#__PURE__*/_react["default"].createElement("label",{className:"bom-form-toggle__label","data-testid":"bom-toggle-label",htmlFor:id},/*#__PURE__*/_react["default"].createElement("span",{"aria-hidden":"true",className:"bom-form-toggle-focus"},/*#__PURE__*/_react["default"].createElement("span",{className:"bom-form-toggle-track"},/*#__PURE__*/_react["default"].createElement("span",{className:"bom-form-toggle-thumb"}))),/*#__PURE__*/_react["default"].createElement("span",{className:"bom-form-toggle__label-text"},label)))}}]);return Toggle}(_react["default"].PureComponent);(0,_defineProperty2["default"])(Toggle,"defaultProps",{});var ToggleWithRef=/*#__PURE__*/_react["default"].forwardRef(function(props,ref){return/*#__PURE__*/_react["default"].createElement(Toggle,(0,_extends2["default"])({innerRef:ref},props))});ToggleWithRef.displayName="Toggle";var _default=ToggleWithRef;exports["default"]=_default; |
{ | ||
"name": "@ausbom/form", | ||
"version": "0.4.5", | ||
"version": "0.4.6", | ||
"description": "", | ||
@@ -45,3 +45,3 @@ "keywords": [], | ||
}, | ||
"gitHead": "8595a64b285c79fd427584974e26fc55960b9758" | ||
"gitHead": "f12f1f48edaad3a2709a4cb1b14db15b0ba234bd" | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 5 instances 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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
76277
189
1